Skip to content

Commit d8aa90e

Browse files
committed
chore: test framework didnt exist with -q cli flag
1 parent 8fd4f08 commit d8aa90e

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

test/UnitTestReporter.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ define(function (require, exports, module) {
6565
return '';
6666
}
6767

68-
function hasCliFlag(args, flagName) {
69-
return args.some(arg => arg === `--${flagName}` || arg.startsWith(`--${flagName}=`));
68+
function hasCliFlag(args, flagName, shortFlag) {
69+
return args.some(arg =>
70+
arg === `--${flagName}` ||
71+
arg.startsWith(`--${flagName}=`) ||
72+
(shortFlag && arg === `-${shortFlag}`)
73+
);
7074
}
7175

7276
function quitIfNeeded(exitStatus) {
@@ -88,7 +92,7 @@ define(function (require, exports, module) {
8892
});
8993
} else if (isElectron) {
9094
window.electronAppAPI.getCliArgs().then(args => {
91-
if (hasCliFlag(args, 'quit-when-done')) {
95+
if (hasCliFlag(args, 'quit-when-done', 'q')) {
9296
window.electronAppAPI.quitApp(exitStatus);
9397
}
9498
});

0 commit comments

Comments
 (0)