[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}`)
|
throw new Error(`Exit with ${exitCode}`)
|
||||||
};
|
};
|
||||||
|
|
||||||
const cliDescription = getDefaultCliDescription();
|
const parser = new CliArgsParser(getDefaultCliDescription());
|
||||||
cliDescription.freeArgsTitle = null;
|
const untypedArgs = parser.parse(window.__karma__.config.args);
|
||||||
const parser = new CliArgsParser(cliDescription);
|
|
||||||
|
|
||||||
const processArgs = window.__karma__.config.args;
|
|
||||||
const untypedArgs = parser.parse(processArgs);
|
|
||||||
|
|
||||||
const initialAdapter = kotlin_test.kotlin.test.detectAdapter_8be2vx$();
|
const initialAdapter = kotlin_test.kotlin.test.detectAdapter_8be2vx$();
|
||||||
kotlin_test.setAdapter(runWithFilteringAndConsoleAdapters(initialAdapter, untypedArgs));
|
kotlin_test.setAdapter(runWithFilteringAndConsoleAdapters(initialAdapter, untypedArgs));
|
||||||
|
|||||||
@@ -4,27 +4,7 @@ import {runWithFilteringAndConsoleAdapters} from "./src/Adapter";
|
|||||||
const kotlin_test = require('kotlin-test');
|
const kotlin_test = require('kotlin-test');
|
||||||
|
|
||||||
const parser = new CliArgsParser(getDefaultCliDescription());
|
const parser = new CliArgsParser(getDefaultCliDescription());
|
||||||
|
const untypedArgs = parser.parse(process.argv);
|
||||||
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 initialAdapter = kotlin_test.kotlin.test.detectAdapter_8be2vx$();
|
const initialAdapter = kotlin_test.kotlin.test.detectAdapter_8be2vx$();
|
||||||
kotlin_test.setAdapter(runWithFilteringAndConsoleAdapters(initialAdapter, untypedArgs));
|
kotlin_test.setAdapter(runWithFilteringAndConsoleAdapters(initialAdapter, untypedArgs));
|
||||||
@@ -100,8 +100,6 @@ export class CliArgsParser {
|
|||||||
continue args;
|
continue args;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.badArgsExit("Unknown option: " + arg);
|
|
||||||
} else {
|
} else {
|
||||||
result.free.push(arg)
|
result.free.push(arg)
|
||||||
}
|
}
|
||||||
@@ -149,6 +147,6 @@ export function getDefaultCliDescription(): CliDescription {
|
|||||||
default: IgnoredTestSuitesReporting.reportAllInnerTestsAsIgnored
|
default: IgnoredTestSuitesReporting.reportAllInnerTestsAsIgnored
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
freeArgsTitle: "module_name"
|
freeArgsTitle: null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user