[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 {CliArgsParser, getDefaultCliDescription} from "./src/CliArgsParser";
|
||||||
import {runWithFilteringAndConsoleAdapters} from "./src/Adapter";
|
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(
|
if (kotlin_test) {
|
||||||
getDefaultCliDescription(),
|
const parser = new CliArgsParser(
|
||||||
(exitCode) => {
|
getDefaultCliDescription(),
|
||||||
throw new Error(`Exit with ${exitCode}`)
|
(exitCode) => {
|
||||||
}
|
throw new Error(`Exit with ${exitCode}`)
|
||||||
);
|
}
|
||||||
const untypedArgs = parser.parse(window.__karma__.config.args);
|
);
|
||||||
|
const untypedArgs = parser.parse(window.__karma__.config.args);
|
||||||
|
|
||||||
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));
|
||||||
|
|
||||||
const resultFun = window.__karma__.result;
|
const resultFun = window.__karma__.result;
|
||||||
window.__karma__.result = function (result) {
|
window.__karma__.result = function (result) {
|
||||||
console.log(`--END_KOTLIN_TEST--\n${JSON.stringify(result)}`);
|
console.log(`--END_KOTLIN_TEST--\n${JSON.stringify(result)}`);
|
||||||
resultFun(result)
|
resultFun(result)
|
||||||
};
|
};
|
||||||
|
}
|
||||||
@@ -1,13 +1,19 @@
|
|||||||
import {CliArgsParser, getDefaultCliDescription} from "./src/CliArgsParser";
|
import {CliArgsParser, getDefaultCliDescription} from "./src/CliArgsParser";
|
||||||
import {runWithFilteringAndConsoleAdapters} from "./src/Adapter";
|
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(
|
if (kotlin_test) {
|
||||||
getDefaultCliDescription(),
|
const parser = new CliArgsParser(
|
||||||
process.exit
|
getDefaultCliDescription(),
|
||||||
);
|
process.exit
|
||||||
const untypedArgs = parser.parse(process.argv);
|
);
|
||||||
|
const untypedArgs = parser.parse(process.argv);
|
||||||
|
|
||||||
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));
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user