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
commit 18e14f5920
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 175 additions and 253 deletions

View file

@ -180,6 +180,7 @@ proc `<` *(x, y: JsObject): JsObject {.importcpp: "(# < #)".}
proc `>=` *(x, y: JsObject): JsObject {.importcpp: "(# >= #)".}
proc `<=` *(x, y: JsObject): JsObject {.importcpp: "(# <= #)".}
proc `**` *(x, y: JsObject): JsObject {.importcpp: "((#) ** #)".}
# (#) needed, refs https://github.com/nim-lang/Nim/pull/16409#issuecomment-760550812
proc `and`*(x, y: JsObject): JsObject {.importcpp: "(# && #)".}
proc `or` *(x, y: JsObject): JsObject {.importcpp: "(# || #)".}
proc `not`*(x: JsObject): JsObject {.importcpp: "(!#)".}