JS Tests cannot use code outside of Kotlin libs
dotasek opened this issue · 0 comments
dotasek commented
The following branch creates a fairly straightforward function and attempts to test it via a JS test: https://github.com/hapifhir/org.hl7.fhir.validator-wrapper/tree/do-create-js-tests
This fails when building, and will fail when gradlew test
is called, or when attempting to test via IntelliJ IDEA's UI:
2022-10-25T14:00:36.585+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] Uncaught NullPointerException
2022-10-25T14:00:36.585+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] at /tmp/_karma_webpack_55465/commons.js:162111:7
2022-10-25T14:00:36.585+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] NullPointerException
2022-10-25T14:00:36.585+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] at Object.captureStack (/tmp/_karma_webpack_55465/commons.js:157821:15)
2022-10-25T14:00:36.585+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] at NullPointerException.Exception [as constructor] (/tmp/_karma_webpack_55465/commons.js:158160:14)
2022-10-25T14:00:36.585+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] at NullPointerException.RuntimeException [as constructor] (/tmp/_karma_webpack_55465/commons.js:158186:17)
2022-10-25T14:00:36.585+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] at RuntimeException_init_0 (/tmp/_karma_webpack_55465/commons.js:158197:24)
2022-10-25T14:00:36.585+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] at new NullPointerException (/tmp/_karma_webpack_55465/commons.js:158306:7)
2022-10-25T14:00:36.585+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] at Object.throwNPE (/tmp/_karma_webpack_55465/commons.js:162111:13)
2022-10-25T14:00:36.585+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] at Kotlin.ensureNotNull (/tmp/_karma_webpack_55465/commons.js:119206:35)
2022-10-25T14:00:36.586+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] at main (/tmp/_karma_webpack_55465/commons.js:82353:19)
2022-10-25T14:00:36.586+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] at /tmp/_karma_webpack_55465/commons.js:95646:3
2022-10-25T14:00:36.586+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] at ../validator-wrapper/kotlin/validator-wrapper.js (/tmp/_karma_webpack_55465/commons.js:95649:2)
2022-10-25T14:00:36.669+0000 [ERROR] [org.jetbrains.kotlin.gradle.tasks.testing] java.lang.IllegalStateException: command '/home/vsts/.gradle/nodejs/node-v16.13.0-linux-x64/bin/node' exited with errors (exit code: 1)