aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 87c0e87f..808ca86d 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -57,4 +57,6 @@ interface WSpec : DomSpec {
}
}
-} \ No newline at end of file
+}
+
+external fun require(name: String): dynamic
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt
index 8afa7317..283847e8 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/html/ImageSpec.kt
@@ -1,10 +1,10 @@
package test.pl.treksoft.kvision.html
-import pl.treksoft.kvision.core.Img
import pl.treksoft.kvision.core.Root
import pl.treksoft.kvision.html.IMAGESHAPE
import pl.treksoft.kvision.html.Image
import test.pl.treksoft.kvision.DomSpec
+import test.pl.treksoft.kvision.require
import kotlin.browser.document
import kotlin.test.Test
import kotlin.test.assertEquals
@@ -15,7 +15,7 @@ class ImageSpec : DomSpec {
fun render() {
run {
val root = Root("test")
- val res = Img("kotlin.png")
+ val res = require("./img/placeholder.png")
val image = Image(res, "Image", true, IMAGESHAPE.ROUNDED, true)
root.add(image)
val element = document.getElementById("test")