Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes uses old title when running on mac #39

Open
IanVS opened this issue Nov 24, 2021 · 2 comments
Open

Sometimes uses old title when running on mac #39

IanVS opened this issue Nov 24, 2021 · 2 comments

Comments

@IanVS
Copy link
Contributor

IanVS commented Nov 24, 2021

I'm in the process of adding mac and windows runners to the storybook unit tests (storybookjs/storybook#16744), and I've come across some odd behavior which I can also reproduce locally on my own mac, on the latest version of storybook. But I don't see any failures for it in the existing storybook unit tests, which have only been running on linux, which is why I say this is mac specific.

We have a describe.each test, https://github.com/storybookjs/storybook/blob/a9f9abc0a7cd71744db4ea68cd2834d5b86325bc/lib/core-server/src/core-presets.test.ts#L132-L178, which creates multiple snapshot files for each test case. About one time in four, the wrong title is used in one or two of the snapshots, usually it's something like this:

diff --git a/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod b/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod
index 852c93c75b..9a5ed48d4d 100644
--- a/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod
+++ b/lib/core-server/src/__snapshots__/vue-3-cli_manager-prod
@@ -1,6 +1,6 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP

-exports[`vue-3-cli manager production mode 1`] = `
+exports[`vue-3-cli preview dev mode 1`] = `
 Object {
   "entry": Array [
     "ROOT/lib/core-client/dist/esm/globals/polyfills.js",

I also see this same intermittent behavior when I run in windows (in a vm on my mac), as well. Perhaps this is a jest issue and not a problem with this tool, but I wanted to bring it up here to see if you might have any insight into what might be going on. Any ideas you might have would be greatly appreciated! Thanks!

@igor-dv
Copy link
Owner

igor-dv commented Nov 25, 2021

Hey @IanVS , thanks for letting me know, I will try to invest some time to research this, if you find something about it too, lmk

@IanVS
Copy link
Contributor Author

IanVS commented Nov 25, 2021

@igor-dv I think it has something to do with the tests running concurrently when they shouldn't, or sometimes one taking longer than it should. I doubt it really has anything to do with this package, it's likely something to do with jest itself or the way we have the test structured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants