Skip to content

Commit e532589

Browse files
Merge pull request #1626 from NativeScript/vladimirov/fix-tests-double-restart
Fix double navigation when showing test results
2 parents 71e65f3 + a4a407c commit e532589

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/services/test-execution-service.ts

+5
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,20 @@ class TestExecutionService implements ITestExecutionService {
193193
options: {
194194
debugTransport: this.$options.debugTransport,
195195
debugBrk: this.$options.debugBrk,
196+
watch: !!this.$options.watch
196197
}
197198
},
198199
};
200+
199201
if (this.$config.DEBUG || this.$logger.getLevel() === 'TRACE') {
200202
karmaConfig.logLevel = 'DEBUG';
201203
}
204+
202205
if (!this.$options.watch) {
206+
// Setting singleRun to true will automatically start the tests when new browser (device in our case) is registered in karma.
203207
karmaConfig.singleRun = true;
204208
}
209+
205210
if (this.$options.debugBrk) {
206211
karmaConfig.browserNoActivityTimeout = 1000000000;
207212
}

0 commit comments

Comments
 (0)