Commit graph

7 commits

Author SHA1 Message Date
Pavel Djundik 4ce2efe86b Upgrade mocha and remove mochapack 2020-04-11 12:27:08 +03:00
Pavel Djundik 17365d9967 Remove references to vue.js 2019-11-25 20:13:09 +02:00
Alistair McKinlay 133e7bf710 Format js/vue with prettier 2019-07-19 11:27:40 +01:00
Richard Lewis caf728a2a7 Instrument tests with nyc instead of istanbul-instrumenter-loader. 2019-02-12 12:49:05 +02:00
Pavel Djundik 2bb627e7f2
Fix stacktraces in client tests 2018-09-04 23:18:17 +03:00
Pavel Djundik 0030f68831 Update to webpack4 WIP 2018-04-06 12:52:52 +03:00
Jérémie Astori 9c4ea85041 Instrument client code before running tests
Despite being a bit gross to look at, this brings a few advantages:

- Tests are now closer to what actually runs, so more likely to find broken stuff.
- We can start using things that were so far Webpack-only or browser-only, like ES6 imports, loading Handlebars templates, etc.
- We open ourselves to browser testing (there is some work to do, but that would be a necessary step).
- We improve the client/server separation, by making it possible to run them independently

I do some extra steps around coverage: now we have 2 reports (client + server), so I have an extra step to combine them (the `nyc report` part). This is  strictly to keep feature parity (the coverage report of this code is effectively the same as before), but in the near future, we might want to keep both reports separate, for example to continue separating client/server. Another reason would be to use something like Codecov, which I believe has the ability to have multiple reports. This is down the road though, our coverage is not good enough to make hosting them somewhere be useful (I think).

A few extras with this commit:

- Coverage summary is displayed when tests are run (this is not slowing down tests)
- Tests check for leaks (see https://mochajs.org/#--check-leaks)
- Tests now output with the `dot` reporter. This is nice as `npm test` runs in parallel, the whole output holds in a few lines instead of spanning over multiple screens.
2018-02-20 15:32:30 +02:00