[Gradle, JS] Improvements of kotlin test adapters
- divide adapter.js into different files, which frameworks could load separately - possibility to inject something to kotlin-test adapter by user ^KT-54418 fixed
This commit is contained in:
committed by
Space Team
parent
d423782fac
commit
b01411544a
@@ -13,10 +13,18 @@ const parser = new CliArgsParser(
|
||||
throw new Error(`Exit with ${exitCode}`)
|
||||
}
|
||||
);
|
||||
|
||||
const untypedArgs = parser.parse(window.__karma__.config.args);
|
||||
|
||||
const adapterTransformer: (current: KotlinTestRunner) => KotlinTestRunner = current =>
|
||||
runWithFilteringAndConsoleAdapters(current, untypedArgs);
|
||||
let adapterTransformer: (current: KotlinTestRunner) => KotlinTestRunner
|
||||
if (window.kotlinTest) {
|
||||
const currentAdapterTransformer = window.kotlinTest.adapterTransformer;
|
||||
adapterTransformer = current =>
|
||||
runWithFilteringAndConsoleAdapters(currentAdapterTransformer(current), untypedArgs);
|
||||
} else {
|
||||
adapterTransformer = current =>
|
||||
runWithFilteringAndConsoleAdapters(current, untypedArgs);
|
||||
}
|
||||
|
||||
window.kotlinTest = {
|
||||
adapterTransformer: adapterTransformer
|
||||
|
||||
Reference in New Issue
Block a user