mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-05 12:37:46 +00:00
make JS tests green
This commit is contained in:
@@ -48,4 +48,4 @@ for i in 1 .. 10:
|
||||
|
||||
let results = runCallbacks()
|
||||
|
||||
doAssert(expected == results)
|
||||
doAssert(expected == $results)
|
||||
|
||||
@@ -34,7 +34,7 @@ var
|
||||
recurse1 = Recurse[int](data: 1, next: recurse2)
|
||||
|
||||
|
||||
doAssert test.name == "Jorden"
|
||||
doAssert test.name == cstring"Jorden"
|
||||
doAssert knight.age == 19
|
||||
doAssert knight.item.price == 50
|
||||
doAssert recurse1.next.next.data == 3
|
||||
|
||||
@@ -64,7 +64,7 @@ block:
|
||||
proc test(): bool =
|
||||
let obj = newJsObject()
|
||||
obj.`?!$` = proc(x, y, z: int, t: cstring): cstring = t & $(x + y + z)
|
||||
obj.`?!$`(1, 2, 3, "Result is: ").to(cstring) == "Result is: 6"
|
||||
obj.`?!$`(1, 2, 3, "Result is: ").to(cstring) == cstring"Result is: 6"
|
||||
echo test()
|
||||
|
||||
# Test JsObject []()
|
||||
|
||||
Reference in New Issue
Block a user