com-lihaoyi / scalatags

ScalaTags is a small XML/HTML construction library for Scala.
https://com-lihaoyi.github.io/scalatags/
MIT License
757 stars 117 forks source link

Add scalajs-env-jsdom-nodejs #203

Closed lolgab closed 4 years ago

lolgab commented 4 years ago

Now all the tests pass except one. The "proper escaping" test fails because a wrong substitution in TestUtil.clean. Didn't spend time to debug it, by the way.

lihaoyi commented 4 years ago

@lolgab I'm seeing the following failure in travis

[80/314] scalatags.js[2.12.10,0.6.32].test.test 
Starting process: node
/home/travis/build/lihaoyi/scalatags/node_modules/webidl-conversions/lib/index.js:357
    } catch {
            ^
SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:599:28)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/travis/build/lihaoyi/scalatags/node_modules/jsdom/lib/jsdom/browser/Window.js:3:27)
1 targets failed
scalatags.js[2.12.10,0.6.32].test.test org.scalajs.jsenv.ExternalJSEnv$NonZeroExitException: Node.js with JSDOM exited with code 1
The command "./mill scalatags.js.__.test.test" exited with 1.
lolgab commented 4 years ago

@lihaoyi Correct. Debugging it.

lolgab commented 4 years ago

@lihaoyi Ready for another review round.

lihaoyi commented 4 years ago

@lolgab how about we just disable scalatags.jsdom.ExampleTests.properEscaping for the JS/JSDOM backend tests? If we're going to make more tests work, might as well go for green

lolgab commented 4 years ago

Done ✅

lolgab commented 4 years ago

✅ Green Travis 🎉

lihaoyi commented 4 years ago

shipit