Setup project for both selenium and jsdom testing env

Viewed 38

I would like to chose on witch jsenv i will run my test with command line.

I have already setup my two env:

jsEnv in Test := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv()

and

jsEnv in Test := BrowserStackRunner.load() // selenium

how I can select witch one to use in command line?

Ideally i would like something like sbt test:jsdom and sbt test:selenium

Thank you

1 Answers

Use the set command of sbt:

$ sbt 'set jsEnv in Test := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv()' test
$ sbt 'set jsEnv in Test := BrowserStackRunner.load()' test
Related