js: improve tests + some docs (#16727)
* js: improve tests * _ * _ * _ * fixup
This commit is contained in:
parent
e4a529962e
commit
18e14f5920
5 changed files with 175 additions and 253 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue