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

Kotlin/JS 2.0.0-RC1 Incompatibilities (environmental variables not working, error output not printed) #3978

Open
mgroth0 opened this issue Apr 21, 2024 · 1 comment
Labels
question ❓ Inquiries or clarifications needed about the project. waiting-for-clarification ❔ Issues with this tag are waiting on the user to provide more information

Comments

@mgroth0
Copy link

mgroth0 commented Apr 21, 2024

Hello, aside from the lack of support for nested tests what is the current status for support of Kotlin/JS tests for Kotlin-2.0.0 RC1?

Here is my current experience in my real project.

First, these are some of the important JS configurations I have set:

  • ecmaTarget: es5 (not es2015)
  • variant: CommonJS (not ECMAScript)
  • IR Compilation
  • Mocha Test Task
  • JS Target: Browser

And I am doing this with versions:

  • Regular Kotest dependencies: 5.9.0.1440-SNAPSHOT
  • Gradle plugin: 5.8.1 (I see no gradle plugin snapshot build)
  • Setting kotestCompilerPluginVersion to 5.9.0.1440-SNAPSHOT

And my experience in my real project is the I see two issues, and unsure if they are related or not:

  1. Error output is not printed. I just see
command '/Users/matthewgroth/.gradle/nodejs/node-v20.10.0-darwin-arm64/bin/node' exited with errors (exit code: 1)

Errors do not show in gradle output at all, even at the --info log level. I have to copy and paste the full test shell command to a terminal in order to see any errors.I saw a commit from 3 weeks ago that mentioned fixing log output: 2d62856But I am using the latest snapshot. I'm not sure if that commit was applied in the snapshot I am using?

  1. when the kotest plugin is applied for some reason, environmental variables are no longer passed to tests.

(this property is broken: https://github.com/JetBrains/kotlin/blob/d19d5c38feb8cc88064235b322e3dc44d3cfc32f/[...]/org/jetbrains/kotlin/gradle/targets/js/testing/KotlinJsTest.kt)

Please let me know if I should split this into two different issues.

@OliverO2
Copy link
Contributor

  1. Error output is not printed. I just see

This is about a Node.js test, right? If so, the issue is #3329, which has been around for a while but will get fixed by #3954 once that is merged. I'll try to get this done by next weekend, so then there will be a snapshot you could use.

  1. when the kotest plugin is applied for some reason, environmental variables are no longer passed to tests.

I have no idea. Are you expecting environment variables to be passed to JS in the browser? In any case, please open a separate issue and refer to relevant documentation.

@OliverO2 OliverO2 added question ❓ Inquiries or clarifications needed about the project. waiting-for-clarification ❔ Issues with this tag are waiting on the user to provide more information labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question ❓ Inquiries or clarifications needed about the project. waiting-for-clarification ❔ Issues with this tag are waiting on the user to provide more information
Projects
None yet
Development

No branches or pull requests

2 participants