ec2dd58165
Use `// !LANGUAGE: -ReleaseCoroutines` instead in tests which require old (1.2) coroutines, and nothing in tests which require new coroutines because master is already 1.3. Also remove superfluous API_VERSION and other directives which have no effect anymore. Do not include runtime automatically with `WITH_COROUTINES`/`COMMON_COROUTINES_TEST` in box tests; require `WITH_RUNTIME` for that (majority of tests already had it anyway), but remove it from bytecode text tests where runtime is always added automatically. Fix the coroutine package selection code in KotlinTestUtils and update the bunch files correspondingly. Disable tests in `box/coroutines/noStdLib` on JVM: despite the name, these tests were launched with stdlib because of the code in CodegenTestCase, and they do not work without it because at least CoroutineUtil.kt requires stdlib to compile correctly
JavaScript Translation
This module performs the translation of Kotlin source code to JavaScript.
There are various Kotlin APIs to JavaScript environments in the standard library.
Compiling the Kotlin Standard Library for JavaScript
The Kotlin Standard Library for JS is built with gradle, see the corresponding module's ReadMe.
Reusing JVM based test cases in JavaScript
Any Kotlin test cases using the org.junit.Test annotation and the kotlin.test package, such as this test case are automatically converted to JavaScript using QUnit.
This allows the test cases to be run directly in a web page in any web browser.
Using the Kotlin Library in JavaScript
There is a simple sample which shows how to use the Kotlin Standard Library from inside JavaScript in a web page.
Contributing
We love contributions! The JavaScript translation could really use your help! If you fancy contributing:
- check the contributing section on general stuff like getting the code etc
- try fix one of the pending JavaScript translation issues