Should the new Compose UI testing functionality wo...
# compose-web
j
Should the new Compose UI testing functionality work with Wasm. Created new project using https://kmp.jetbrains.com/ and followed instructions at https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-test.html#writing-and-running-tests-with-compose-multiplatform but getting error running test for Wasm target (more in thread)
Copy code
> Task :composeApp:wasmJsBrowserTest FAILED
404: /absolute/var/folders/km/nnzy6qg173nf385_d4v23j780000gn/T/_karma_webpack_739296/kotlin_skiko_mjs.js
  (error: /var/folders/km/nnzy6qg173nf385_d4v23j780000gn/T/_karma_webpack_739296/kotlin_skiko_mjs.js)
      at __webpack_require__.f.j (/var/folders/km/nnzy6qg173nf385_d4v23j780000gn/T/_karma_webpack_739296/runtime.js:292:29)
      at /var/folders/km/nnzy6qg173nf385_d4v23j780000gn/T/_karma_webpack_739296/runtime.js:153:40
      at Array.reduce (<anonymous>)
      at __webpack_require__.e (/var/folders/km/nnzy6qg173nf385_d4v23j780000gn/T/_karma_webpack_739296/runtime.js:152:67)
      at instantiate (/Users/joreilly/Downloads/KotlinProject%202/build/js/packages/composeApp-test/kotlin/composeApp-test.uninstantiated.mjs:13:68 <- load.4271762857.js:47:88)
      at /Users/joreilly/Downloads/KotlinProject%202/build/js/packages/composeApp-test/kotlin/composeApp-test.mjs:3:34 <- load.4271762857.js:18:153
      at __webpack_require__.a (/var/folders/km/nnzy6qg173nf385_d4v23j780000gn/T/_karma_webpack_739296/runtime.js:83:13)
      at ./kotlin/composeApp-test.mjs (load.4271762857.js:10:21)
      at Function.__webpack_require__ (/var/folders/km/nnzy6qg173nf385_d4v23j780000gn/T/_karma_webpack_739296/runtime.js:23:41)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':composeApp:wasmJsBrowserTest'.
docs seem to indicate it should be possible
a
I am getting similar errors as well
m
Maybe is too late but adding
karma.config.d
, as suggested here, solved the issue in my case. https://kotlinlang.slack.com/archives/CDFP59223/p1702977410505449?thread_ts=1702668737.674499&cid=CDFP59223