-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Jest CLI options such as --onlyChanged don’t work #2901
Comments
@d4vidi, shall we add one more |
@sonicdoe, may I suggest adding diff --git a/detox/test/e2e/detox.config.js b/detox/test/e2e/detox.config.js
index 215c13a0..44e0fafa 100644
--- a/detox/test/e2e/detox.config.js
+++ b/detox/test/e2e/detox.config.js
@@ -8,7 +8,7 @@ const launchArgs = {
const config = {
testRunner: 'nyc jest',
runnerConfig: 'e2e/config.js',
- specs: 'e2e/*.test.js',
+ specs: ' ',
skipLegacyWorkersInjection: true,
behavior: { |
Thanks, that works 👍 By the way, this |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this reporsitory, read this discussion. |
This issue is still present in Detox v18.20.2. |
@noomorph something to address this week, maybe? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this reporsitory, read this discussion. |
This issue is still present in Detox v18.22.0. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this reporsitory, read this discussion. |
I haven’t tested it again, but looking at the changelog, I assume this is still present in the latest version. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this reporsitory, read this discussion. |
I haven’t tested it again, but I assume this issue is still relevant. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this reporsitory, read this discussion. |
I haven’t tested it again, but I assume this issue is still relevant. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this reporsitory, read this discussion. |
I haven’t tested it again, but I assume this issue is still relevant. |
@noomorph wouldn't it be better off if the issue is merged with Detox 20? |
I think this issue is no longer relevant for Detox 20. Please create a new one if something does not work. |
Thanks! I can confirm that |
@sonicdoe let me know if you experience issues in |
As far as I can tell, |
Description
Jest CLI options such as
--onlyChanged
and--watch
don’t work because Detox always passes thee2e
directory.✓ I have tested this issue on the latest Detox release and it still reproduces.
Reproduction
npm install detox@18.19.0 --save-dev
npm run test:ios-debug -- --onlyChanged
Expected behavior
Jest understands the
--onlyChanged
option and only runs tests which have changed.Suggested solution
Detox explicitly passes the
e2e
directory when invoking Jest, for example,jest --config e2e/config.json e2e
. When specifying both--onlyChanged
ande2e
, Jest gives preference toe2e
and runs all tests.However, specifying
e2e
is not really necessary because Jest defaults to running all tests matchingtestMatch
in therootDir
. For example,jest --config e2e/config.json
also executes all tests.Without
e2e
, options such as--onlyChanged
work. For example, you can invoke Jest manually with:$ DETOX_CONFIGURATION="ios.sim.debug" npx jest --config e2e/config.json --onlyChanged
Then, Jest properly exits with “No tests found related to files changed since last commit.”
Environment
The text was updated successfully, but these errors were encountered: