Repository navigation
Commit ec1c971
chore: migrate tests from mocha to vitest (PRE-3838) (#281)
* chore: migrate tests from mocha to vitest
Replace mocha 6 with vitest 4.1.11. done callbacks become awaited
promises with the assertions moved after the await; vitest.config.js
unsets PRERENDER_SERVICE_URL so the suite is hermetic, and runs test
files serially because both Express support apps bind the same port.
Travis now runs on Node 20, the minimum Vitest 4 supports.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* ci: run the test suite on pull requests
Tests only ran inside the publish job on push to master, so a broken
suite was first seen after merge and blocked the release.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* chore: keep vitest.config.js and .github out of the npm tarball
vitest.config.js requires vitest, a devDependency consumers don't have.
.github already shipped before this PR; the new test workflow would have
joined it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent 63a13e2 commit ec1c971
9 files changed
Lines changed: 1369 additions & 1222 deletions
File tree
- .github/workflows
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments