$ git clone git@github.com:kotest/kotest-examples-javascript.git
[...]
$ cd kotest-examples-javascript
$ ./gradlew check --rerun-tasks --info
[...]
> Task :jsBrowserTest
Caching disabled for task ':jsBrowserTest' because:
Caching has not been enabled for the task
Task ':jsBrowserTest' is not up-to-date because:
Executed with '--rerun-tasks'.
Starting process 'command '[...]''. Working directory: /tmp/kotest-examples-javascript/build/js/packages/kotest-examples-javascript-test Command: [...]/.gradle/nodejs/node-v18.12.1-linux-x64/bin/node --require /tmp/kotest-examples-javascript/build/js/node_modules/source-map-support/register.js /tmp/kotest-examples-javascript/build/js/node_modules/mocha/bin/mocha.js /tmp/kotest-examples-javascript/build/js/packages/kotest-examples-javascript-test/kotlin/kotest-examples-javascript-test.js --require /tmp/kotest-examples-javascript/build/js/packages_imported/kotlin-test-js-runner/0.0.1/kotlin-test-nodejs-empty-runner.js
Successfully started process 'command '/home/ivan/.gradle/nodejs/node-v18.12.1-linux-x64/bin/node''
Starting process 'command '/home/ivan/.gradle/nodejs/node-v18.12.1-linux-x64/bin/node''. Working directory: /tmp/kotest-examples-javascript/build/js/packages/kotest-examples-javascript-test Command: /[...]/.gradle/nodejs/node-v18.12.1-linux-x64/bin/node --require /tmp/kotest-examples-javascript/build/js/node_modules/source-map-support/register.js /tmp/kotest-examples-javascript/build/js/node_modules/mocha/bin/mocha.js /tmp/kotest-examples-javascript/build/js/packages/kotest-examples-javascript-test/kotlin/kotest-examples-javascript-test.js --reporter kotlin-test-js-runner/mocha-kotlin-reporter.js --require /tmp/kotest-examples-javascript/build/js/packages_imported/kotlin-test-js-runner/0.0.1/kotlin-test-nodejs-runner.js --timeout 2s
Successfully started process 'command '/[...]/.gradle/nodejs/node-v18.12.1-linux-x64/bin/node''
Finished generating test XML results (0.0 secs) into: /tmp/kotest-examples-javascript/build/test-results/jsBrowserTest
Generating HTML test report...
Finished generating test html results (0.0 secs) into: /tmp/kotest-examples-javascript/build/reports/tests/jsBrowserTest
Resolve mutations for :jsTest (Thread[Execution worker Thread 3,5,main]) started.
:jsTest (Thread[Execution worker Thread 3,5,main]) started.
[...]
The generated test report is empty.
By editing DogTest.kt and adding an error("failed") call in the test, and rerunning the Gradle command, the report is still empty, and there is no obvious sign that a test has failed (the Gradle command finishes successfully).
I would have expected that:
If a test fails, the Gradle execution ends with an error (like for the JVM platform)
Successful and failed tests to appear in the generated test report
Which version of Kotest are you using 5.7.2
Running the following script:
The generated test report is empty.
By editing
DogTest.kt
and adding anerror("failed")
call in the test, and rerunning the Gradle command, the report is still empty, and there is no obvious sign that a test has failed (the Gradle command finishes successfully).I would have expected that: