js: improve tests + some docs (#16727)

* js: improve tests

* _

* _

* _

* fixup
This commit is contained in:
Timothee Cour
2021-01-16 03:08:40 -08:00
committed by GitHub
parent e4a529962e
commit 18e14f5920
5 changed files with 175 additions and 253 deletions

View File

@@ -36,3 +36,9 @@ for i in big"0" ..< big"5":
doAssert i is JsBigInt
list.add i
doAssert list == @[big"0", big"1", big"2", big"3", big"4"]
block:
let b = big"2"
doAssert -b ** big"3" == big"-8"
doAssert -b ** big"2" == big"4" # not -4 because of precedence
doAssert -big"3" == big"-3"