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

Snapshot separation #12

Closed
orYoffe opened this issue Nov 29, 2018 · 4 comments
Closed

Snapshot separation #12

orYoffe opened this issue Nov 29, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@orYoffe
Copy link
Owner

orYoffe commented Nov 29, 2018

Is your feature request related to a problem? Please describe.
currently the snapshots are being placed in the usual snapshots dedicated folder.

Describe the solution you'd like
Jest just introduced a snapshot folder resolver to enable using different folders thus enabling us to create one for native and one for web in each component

Additional context
if you do snapshots for both platforms one will delete the other as it would mark it as obsolete

@geminiyellow
Copy link

geminiyellow commented Dec 6, 2018

in v1, i use coverageDirectory something like

coverageDirectory: 'coverageNative',

for coverage result,

and use __[Platform]_snapshoot__ in switchSnapshots for jest snapshot result.

@orYoffe
Copy link
Owner Author

orYoffe commented Dec 6, 2018

hi @geminiyellow,
this feature is planned for the future, since jest offers to choose a directory for your snapshots.
you can copy the jest config, switchSnapshots.js file and the npm scripts commands from v1 in order to fix your project for now.. but this feature will change this to two folders I think

@orYoffe orYoffe added the enhancement New feature or request label Dec 9, 2018
@orYoffe
Copy link
Owner Author

orYoffe commented Dec 21, 2018

will be available with jest v24
jestjs/jest#1650 (comment)

@orYoffe
Copy link
Owner Author

orYoffe commented Mar 7, 2019

after testing the new feature i found jest 24 has issues with react-native v55 and since react-native-web only supports v55 not much can be done at this point

@orYoffe orYoffe closed this as completed Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants