bloop icon indicating copy to clipboard operation
bloop copied to clipboard

Bug: jsdom hardcoded to false in Scala.js projects

Open keynmol opened this issue 4 years ago • 3 comments

Bug

Seems like (unintentionally?) jsdom setting in the generated config is set to false: https://github.com/scalacenter/bloop/blob/3eab1f8079cfaf228ec68740daadf5854070c89b/integrations/sbt-bloop/src/main/scala/bloop/integrations/sbt/SbtBloop.scala#L779

Which means the tests don't run from IDEs.

Manually changing jsdom to true in the generated json config leads to tests running successfully via both bloop and from IDE.

Reproduce

It's not minimal, but not involved:

  1. Clone https://github.com/keynmol/http4s-laminar-stack
  2. Attempt to run FrontendSpec It will fail
  3. modify .bloop/frontend-test.json, changing jsdom property to true
  4. run FrontendSpec again - it should succeed (as long as jsdom is installed on the machine)

keynmol avatar Apr 14 '21 20:04 keynmol

Thanks for reporting! It seems that this just the default and we should pick that up somewhere else. I do not have time to take a look right now, but I will get back to it later on.

tgodzik avatar Apr 15 '21 08:04 tgodzik

I've already started hacking on the codebase trying to fix it - would you mind assigning it to me?

keynmol avatar Apr 15 '21 09:04 keynmol

I've already started hacking on the codebase trying to fix it - would you mind assigning it to me?

Not at all! Thanks!

tgodzik avatar Apr 15 '21 09:04 tgodzik