Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

[e2e] Find a way to use different jest config files #1238

Open
RobinCsl opened this issue Oct 19, 2018 · 2 comments
Open

[e2e] Find a way to use different jest config files #1238

RobinCsl opened this issue Oct 19, 2018 · 2 comments

Comments

@RobinCsl
Copy link
Collaborator

Problem

We have split views for tablets, and that means there are different behaviours, or scenarios, depending on whether you're on tablet or mobile. That means it is somewhat difficult to do e2e testing because of that in the current setup:
I would like to use <title>.tablet.spec.js for tablet specific e2e tests, but jest will pick on it even when executing yarn e2e-iphone, because I cannot specify that jest should ignore tablet.spec.js when executing that command.
Similarly, we could have <title>.phone.spec.js for phone specific e2e tests.
Finally, the tests <title>.spec.js would be general and apply to both phones and tablets.

The way detox can be configured at the moment only allows for one jest config file; it would be nice to allow more.

Any ideas? @tbergq

@ferrannp
Copy link
Contributor

ferrannp commented Nov 6, 2018

@RobinCsl Just throwing a guess here but https://jestjs.io/docs/en/configuration.html#projects-array-string-projectconfig the projects config might be useful for you.

@RobinCsl
Copy link
Collaborator Author

RobinCsl commented Nov 7, 2018

I will have a look at that, thanks @ferrannp!

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

No branches or pull requests

2 participants