KT-12877: add tests for UMD modules
This commit is contained in:
committed by
Alexey Andreev
parent
31a1d6ca66
commit
495c876b3b
@@ -0,0 +1,5 @@
|
||||
define("lib-foo", [], function() {
|
||||
return function(y) {
|
||||
return 23 + y;
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
// MODULE_KIND: UMD
|
||||
package foo
|
||||
|
||||
@JsModule("lib-foo")
|
||||
@JsNonModule
|
||||
@native fun foo(x: Int): Int = noImpl
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(65, foo(42))
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
function lib(y) {
|
||||
return 23 + y;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// MODULE_KIND: UMD
|
||||
// NO_JS_MODULE_SYSTEM
|
||||
package foo
|
||||
|
||||
@JsModule("lib")
|
||||
@JsNonModule
|
||||
@native fun foo(x: Int): Int = noImpl
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(65, foo(42))
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user