featurist / browser-monkey

Reliable DOM testing
https://browsermonkey.org
53 stars 6 forks source link

Run tests in mocha before karma #42

Closed joshski closed 8 years ago

joshski commented 8 years ago

This changes npm test to run mocha before karma.

The vdom specs already pass under mocha (without karma), except for one spec that was flickering. Simplifying the spec fixed it, I don't really understand why.

Were you running these already @dereke? This seemed too easy :)

➜  time karma start --single-run
✔ 229 tests completed
karma start --single-run  8.50s user 2.52s system 73% cpu 14.926 total

➜  time mocha
115 passing (5s)
mocha  1.08s user 0.09s system 23% cpu 4.897 total
dereke commented 8 years ago

yeah I mostly just used mocha when testing the vdom stuff :-) never even crossed my mind to add it to npm test though! what is up with these failures? c++ for travis??

joshski commented 8 years ago

Grr, this passes for me, but I don't know what secret sauce makes npm install work on travis. It's just because we have some ES6 in tests, and we're not browserifying it in mocha-only.

joshski commented 8 years ago

To be clear, ES6 failed under ancient node, upgrading node in travis broke npm install.

dereke commented 8 years ago

hmm weird, when I try this branch locally none of the fuzzy finder tests work in chrome or mocha, ah well the vdom ones don't work in chrome anyway

dereke commented 8 years ago

OK cleared out my node_modules and everything works lovely locally - am on node 6.3 though