Adam S
04/06/2024, 6:25 PMEdoardo Luppi
04/06/2024, 6:31 PMbrowser()
and binaries.library()
, look for jsBrowserDevelopmentLibraryDistribution
The outputted JS files are under build/compileSync/*
if I'm not mistaken.Edoardo Luppi
04/06/2024, 6:32 PMEdoardo Luppi
04/06/2024, 6:33 PMAdam S
04/06/2024, 6:38 PMAdam S
04/06/2024, 6:41 PMbuild/compileSync/js/test/testDevelopmentExecutable/kotlin
. However, I am a JS noob. How can I load these files inside of another .js file?Adam S
04/06/2024, 6:42 PMfun main() {}
inside src/jsTest/kotlin/testMain.kt
. It will log some stuff to the browser console, and I want to be able to run the main()
from inside a custom index.html
Edoardo Luppi
04/06/2024, 6:47 PMAdam S
04/06/2024, 6:48 PMEdoardo Luppi
04/06/2024, 6:48 PMAdam S
04/06/2024, 6:48 PMAdam S
04/06/2024, 6:49 PMAdam S
04/06/2024, 6:51 PMEdoardo Luppi
04/06/2024, 6:51 PMAdam S
04/06/2024, 6:52 PMAdam S
04/06/2024, 6:52 PMEdoardo Luppi
04/06/2024, 6:52 PMAdam S
04/06/2024, 6:52 PMEdoardo Luppi
04/06/2024, 6:53 PMAdam S
04/06/2024, 6:54 PMAdam S
04/06/2024, 6:55 PMAdam S
04/06/2024, 6:56 PMEdoardo Luppi
04/06/2024, 6:57 PMAdam S
04/06/2024, 6:59 PMAdam S
04/06/2024, 6:59 PMAdam S
04/06/2024, 7:01 PMAdam S
04/06/2024, 7:02 PMAdam S
04/06/2024, 7:03 PMAdam S
04/06/2024, 9:39 PMbuild/compileSync/js/test/testDevelopmentExecutable/kotlin
.
<html>
<head><title>KotestJSTestEngine</title></head>
<body>
<script src="/src/kotlin-js-wasm-testing-v3.js"></script>
<script src="/src/kotlin-js-wasm-testing-v3-test.js"></script>
</body>
</html>
However, I now run into the same problem I've had before in other situations, where I need to manually load all of the dependencies...
Uncaught Error: Error loading module 'kotlin-js-wasm-testing-v3'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'kotlin-js-wasm-testing-v3'.
There's supposed to be an all-in-one .js file that loads everything...Adam S
04/06/2024, 9:41 PMgradle build
then I can see that all-in-one file for the main source set build/dist/js/productionExecutable/v3.js
(v3 is the name of the Gradle subproject)`. But not for the test sources.Adam S
04/07/2024, 9:03 AMgradle :v3:jsTestKotest
, and it should run the tests, and report some of the results to IntelliJ.