fix #17286 nim check -b:js works (#19704)

* fix #17286 nim check -b:js works

* fix
This commit is contained in:
flywind
2022-04-09 23:52:11 +08:00
committed by GitHub
parent 152dab0983
commit a77ffdb7ea
2 changed files with 18 additions and 0 deletions

16
tests/misc/t17286.nim Normal file
View File

@@ -0,0 +1,16 @@
discard """
cmd: "nim check -b:js $file"
action: "compile"
"""
# bug #17286
import std/compilesettings
static:
doAssert querySetting(backend) == "js"
doAssert defined(js)
doAssert not defined(c)
import random
randomize()