Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/main-view-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { TestExecutionService } from './services/test-execution-service';
import { killProcess } from "./stop-process";

declare var global: any;
declare const __TEST_RUNNER_STAY_OPEN__: boolean;

function enableSocketIoDebugging() {
console.log('enabling socket.io debugging');
Expand Down Expand Up @@ -171,7 +172,9 @@ export class TestBrokerViewModel extends Observable {
acknowledged = true;
console.log('NSUTR: completeAck');
this.emitToSocket('disconnect');
setTimeout(() => killProcess(), 500);
if (typeof __TEST_RUNNER_STAY_OPEN__ === 'undefined' || !__TEST_RUNNER_STAY_OPEN__) {
setTimeout(() => killProcess(), 500);
}
};
this.emitToSocket('complete', data || {}, ackFn);
setTimeout(ackFn, 1000); // acknowledge is no longer sent by the karma server, so we use a timeout to ensure it runs
Expand Down
8 changes: 8 additions & 0 deletions nativescript.webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ function setupKarmaBuild(config, env, webpack) {
config.module.rules.delete('angular');
}
// config.plugins.delete('CleanWebpackPlugin')
config.plugin('DefinePlugin').tap((args) => {
args[0] = merge(args[0], {
__TEST_RUNNER_STAY_OPEN__: !!env.stayOpen,
});

return args;
});



config.output.delete('path'); // use temp path
Expand Down