Commit 5243401
committed
Migrate tests from mocha and chai to node-tap (#83)
* Replace testing dependencies
- `mocha` with `tap`
- `chai-http` with `simple-get`
* Rewrite Validator tests to use tap
The original tests were testing Ajv functionality, which seems
unnecessary, so I've removed them.
* Rewrite middleware tests to use tap
* Rewrite integration tests to use tap
In the process of rewriting these tests I've added `name` as a
required property in the JSON schema and corrected the request
body which is being sent for a "valid" request.
* Remove glob from tap command in test run script
The `tap` CLI will automatically look in the `test/` directory.
* Update CI GitHub Actions workflow
Change to work with `tap`.
* Update npm lockfile
* Update ESLint configuration
The `no-shadow` rule has been disabled for tests, as when tests are
written using `tap`, the variable `t` is typically shadowed in
subtests.1 parent 5424157 commit 5243401
File tree
11 files changed
+2421
-685
lines changed- .github/workflows
- test
11 files changed
+2421
-685
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 27 | + | |
| 28 | + | |
0 commit comments