You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 038f66a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: content/guide/testing.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -291,6 +291,8 @@ To execute your test suite in CI make sure to add `--justlaunch`. This parameter
291
291
ns test ios --emulator --justlaunch
292
292
```
293
293
294
+
Recent versions of the NativeScript CLI also turn watch mode off automatically when the `CI` or `JENKINS_HOME` environment variable is set, so `ns test` exits once the tests finish.
295
+
294
296
Each execution of `ns test` consists of the following steps, performed automatically.
295
297
296
298
1. The CLI starts a Karma server on the development machine.
@@ -306,15 +308,17 @@ Each execution of `ns test` consists of the following steps, performed automatic
306
308
307
309
The NativeScript can continuously monitor your code for changes and when such changes occur, it can deploy those changes to your testing devices and re-run your tests.
308
310
309
-
To enable this behavior, run your `ns test` command with the `--watch` flag. For example:
311
+
This behavior is on by default: the NativeScript CLI remains active and re-runs tests on code change. To unlock the console, press `Ctrl+C` to stop the process.
312
+
313
+
To run the tests once and exit instead, pass `--no-watch`:
310
314
311
315
```bash
312
-
ns test android --watch
313
-
ns test ios --watch
314
-
ns test ios --emulator --watch
316
+
ns test android --no-watch
317
+
ns test ios --no-watch
318
+
ns test ios --emulator --no-watch
315
319
```
316
320
317
-
The NativeScript CLI remains active and re-runs tests on code change. To unlock the console, press `Ctrl+C` to stop the process.
321
+
In CI environments (when the `CI` or `JENKINS_HOME` environment variable is set), watch mode is off by default. Pass `--watch` to turn it back on.
0 commit comments