-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
test: one snapshot per fixture test #1491
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
Conversation
This comment has been minimized.
This comment has been minimized.
what's the runtime like?
|
in my local env difference is +-10sec, and i did change this only for estree (as POC) |
Conflicts: packages/typescript-estree/tests/lib/__snapshots__/javascript.ts.snap packages/typescript-estree/tests/lib/__snapshots__/jsx.ts.snap packages/typescript-estree/tests/lib/__snapshots__/typescript.ts.snap
CI is complaining about path that i used |
Surprising that it's so much faster. It must be because it circumvents the checks to clean up the snapshot afterward. |
i played yesterday a little with this plugin and it seems that i can make it work with jest update (it requires small modification to this plugin) |
This is alternative approach to ticket #1142 and change proposed in #1152
Main difference is that this code does not require generation of additional files (test per file) but extends jest functionality by allowing us to provide path to generated snapshot
Changes:
In test files i added one property (path): https://github.com/typescript-eslint/typescript-eslint/pull/1491/files#diff-8b3fe597033edf9c839ecff70500df9e
In test utils from ts-estree i added small piece of code to split snapshots:
e4722e8#diff-c976a68babc2637f35c7d6074d995843R41-R47