Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do Kotlin/JS tests run? #3941

Open
CLOVIS-AI opened this issue Mar 16, 2024 · 0 comments
Open

Do Kotlin/JS tests run? #3941

CLOVIS-AI opened this issue Mar 16, 2024 · 0 comments
Labels
multiplatform-javascript 🌐 Pull requests that update Javascript code question ❓ Inquiries or clarifications needed about the project.

Comments

@CLOVIS-AI
Copy link
Contributor

Which version of Kotest are you using
5.7.2

Running the following script:

$ 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
@LeoColman LeoColman added question ❓ Inquiries or clarifications needed about the project. multiplatform-javascript 🌐 Pull requests that update Javascript code labels Mar 20, 2024
@CLOVIS-AI CLOVIS-AI changed the title How to get the Gradle test report for Kotlin/JS? Do Kotlin/JS tests run? Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multiplatform-javascript 🌐 Pull requests that update Javascript code question ❓ Inquiries or clarifications needed about the project.
Projects
None yet
Development

No branches or pull requests

2 participants