Commit Graph

7 Commits

Author SHA1 Message Date
Paul Melnikow
64e9d13e76 Disallow unused variables and turn on a few recommended rules 2017-04-12 23:55:13 +02:00
Paul Melnikow
de18dce94a Add more test helpers
While working on some tests, I was having a tricky problem in a test suite. Eventually I tracked it down to an interaction between tests. I suspected the test library, but once I tried to make an isolated test case, I realized the test library was working fine. It turns out it was the server’s request cache. The fix is to clear the cache between tests.

Not needed for this PR, though I’m adding it to this branch because it conflicts with this change.
2017-04-12 23:13:16 +02:00
Paul Melnikow
5a45003bc3 Test server logic for img2svg error, and run the server in-process
Running the server in process is necessary for the mock to work. This is an approach I’ve taken in the past. I experimented with this setup quite a bit when I was playing around with a test suite, and it seemed to work well enough. Setting `process.argv` is a admitedly a bit gross, though a cleaner approach would require more involved changes to `server.js`.
2017-04-12 23:13:16 +02:00
Paul Melnikow
3905424d1c Add a test for badge.js and refactor 2017-04-12 23:13:16 +02:00
Thaddee Tyl
522e09f509 Add missing var
It was fogotten when rebasing 5f945d48.
2017-03-30 23:40:49 +02:00
Paul Melnikow
1930d9fdd9 Change some .on to .once to make tests less flaky 2017-03-30 00:18:30 +02:00
Paul Melnikow
076bd384d5 Use a glob pattern instead of hard-coding filenames 2017-03-30 00:18:30 +02:00