[Gradle, JS] Not consider mocha default arguments
#KT-33747 fixed
This commit is contained in:
@@ -12,12 +12,8 @@ process.exit = (exitCode) => {
|
||||
throw new Error(`Exit with ${exitCode}`)
|
||||
};
|
||||
|
||||
const cliDescription = getDefaultCliDescription();
|
||||
cliDescription.freeArgsTitle = null;
|
||||
const parser = new CliArgsParser(cliDescription);
|
||||
|
||||
const processArgs = window.__karma__.config.args;
|
||||
const untypedArgs = parser.parse(processArgs);
|
||||
const parser = new CliArgsParser(getDefaultCliDescription());
|
||||
const untypedArgs = parser.parse(window.__karma__.config.args);
|
||||
|
||||
const initialAdapter = kotlin_test.kotlin.test.detectAdapter_8be2vx$();
|
||||
kotlin_test.setAdapter(runWithFilteringAndConsoleAdapters(initialAdapter, untypedArgs));
|
||||
|
||||
@@ -4,27 +4,7 @@ import {runWithFilteringAndConsoleAdapters} from "./src/Adapter";
|
||||
const kotlin_test = require('kotlin-test');
|
||||
|
||||
const parser = new CliArgsParser(getDefaultCliDescription());
|
||||
|
||||
const defaultMochaArgs = [
|
||||
'--reporter',
|
||||
'place-holder',
|
||||
'--require',
|
||||
'place-holder',
|
||||
'--no-config',
|
||||
'--no-package',
|
||||
'--no-opts',
|
||||
'--diff',
|
||||
'--extension',
|
||||
'js',
|
||||
'--slow',
|
||||
'75',
|
||||
'--timeout',
|
||||
'2000',
|
||||
'--ui',
|
||||
'bdd'
|
||||
];
|
||||
const processArgs = process.argv.slice(2, -1 * defaultMochaArgs.length);
|
||||
const untypedArgs = parser.parse(processArgs);
|
||||
const untypedArgs = parser.parse(process.argv);
|
||||
|
||||
const initialAdapter = kotlin_test.kotlin.test.detectAdapter_8be2vx$();
|
||||
kotlin_test.setAdapter(runWithFilteringAndConsoleAdapters(initialAdapter, untypedArgs));
|
||||
@@ -100,8 +100,6 @@ export class CliArgsParser {
|
||||
continue args;
|
||||
}
|
||||
}
|
||||
|
||||
this.badArgsExit("Unknown option: " + arg);
|
||||
} else {
|
||||
result.free.push(arg)
|
||||
}
|
||||
@@ -149,6 +147,6 @@ export function getDefaultCliDescription(): CliDescription {
|
||||
default: IgnoredTestSuitesReporting.reportAllInnerTestsAsIgnored
|
||||
}
|
||||
},
|
||||
freeArgsTitle: "module_name"
|
||||
freeArgsTitle: null
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user