[Gradle, JS] Add idle run for debug node tests

Source maps can be loaded by NodeJS
This commit is contained in:
Ilya Goncharov
2019-11-29 18:52:25 +03:00
parent 38de98429d
commit 408f958273
4 changed files with 60 additions and 15 deletions
@@ -51,6 +51,7 @@ tasks {
inputs.dir("src")
inputs.files(
"nodejs.ts",
"nodejs-idle.ts",
"karma.ts",
"karma-kotlin-reporter.js",
"karma-debug-runner.js",
+15
View File
@@ -0,0 +1,15 @@
import {KotlinTestRunner} from "./src/KotlinTestRunner";
const kotlin_test = require('kotlin-test');
const nothingTest: KotlinTestRunner = {
suite(name: string, isIgnored: boolean, fn: () => void): void {
console.error("suite", name)
},
test(name: string, isIgnored: boolean, fn: () => void): void {
console.error("test", name)
}
};
kotlin_test.setAdapter(nothingTest);
@@ -16,6 +16,16 @@ export default [
},
plugins: plugins()
},
{
input: './nodejs-idle.ts',
output: {
file: 'lib/kotlin-test-nodejs-idle-runner.js',
format: 'cjs',
banner: '#!/usr/bin/env node',
sourcemap: true
},
plugins: plugins()
},
{
input: './karma.ts',
output: {