[Gradle, JS] Igore if kotlin_test not found
This commit is contained in:
committed by
TeamCityServer
parent
86c6ca7f5f
commit
4cca78f8d8
@@ -6,21 +6,27 @@
|
||||
import {CliArgsParser, getDefaultCliDescription} from "./src/CliArgsParser";
|
||||
import {runWithFilteringAndConsoleAdapters} from "./src/Adapter";
|
||||
|
||||
const kotlin_test = require('kotlin-test');
|
||||
let kotlin_test
|
||||
try {
|
||||
kotlin_test = require('kotlin-test');
|
||||
} catch {
|
||||
}
|
||||
|
||||
const parser = new CliArgsParser(
|
||||
getDefaultCliDescription(),
|
||||
(exitCode) => {
|
||||
throw new Error(`Exit with ${exitCode}`)
|
||||
}
|
||||
);
|
||||
const untypedArgs = parser.parse(window.__karma__.config.args);
|
||||
if (kotlin_test) {
|
||||
const parser = new CliArgsParser(
|
||||
getDefaultCliDescription(),
|
||||
(exitCode) => {
|
||||
throw new Error(`Exit with ${exitCode}`)
|
||||
}
|
||||
);
|
||||
const untypedArgs = parser.parse(window.__karma__.config.args);
|
||||
|
||||
const initialAdapter = kotlin_test.kotlin.test.detectAdapter_8be2vx$();
|
||||
kotlin_test.setAdapter(runWithFilteringAndConsoleAdapters(initialAdapter, untypedArgs));
|
||||
const initialAdapter = kotlin_test.kotlin.test.detectAdapter_8be2vx$();
|
||||
kotlin_test.setAdapter(runWithFilteringAndConsoleAdapters(initialAdapter, untypedArgs));
|
||||
|
||||
const resultFun = window.__karma__.result;
|
||||
window.__karma__.result = function (result) {
|
||||
console.log(`--END_KOTLIN_TEST--\n${JSON.stringify(result)}`);
|
||||
resultFun(result)
|
||||
};
|
||||
const resultFun = window.__karma__.result;
|
||||
window.__karma__.result = function (result) {
|
||||
console.log(`--END_KOTLIN_TEST--\n${JSON.stringify(result)}`);
|
||||
resultFun(result)
|
||||
};
|
||||
}
|
||||
@@ -1,13 +1,19 @@
|
||||
import {CliArgsParser, getDefaultCliDescription} from "./src/CliArgsParser";
|
||||
import {runWithFilteringAndConsoleAdapters} from "./src/Adapter";
|
||||
|
||||
const kotlin_test = require('kotlin-test');
|
||||
let kotlin_test
|
||||
try {
|
||||
kotlin_test = require('kotlin-test');
|
||||
} catch {
|
||||
}
|
||||
|
||||
const parser = new CliArgsParser(
|
||||
getDefaultCliDescription(),
|
||||
process.exit
|
||||
);
|
||||
const untypedArgs = parser.parse(process.argv);
|
||||
if (kotlin_test) {
|
||||
const parser = new CliArgsParser(
|
||||
getDefaultCliDescription(),
|
||||
process.exit
|
||||
);
|
||||
const untypedArgs = parser.parse(process.argv);
|
||||
|
||||
const initialAdapter = kotlin_test.kotlin.test.detectAdapter_8be2vx$();
|
||||
kotlin_test.setAdapter(runWithFilteringAndConsoleAdapters(initialAdapter, untypedArgs));
|
||||
const initialAdapter = kotlin_test.kotlin.test.detectAdapter_8be2vx$();
|
||||
kotlin_test.setAdapter(runWithFilteringAndConsoleAdapters(initialAdapter, untypedArgs));
|
||||
}
|
||||
Reference in New Issue
Block a user