Skip to content

Commit 042e4da

Browse files
authored
chore: add missing integration test prerequisite (#361)
* chore: run build step before `npm run test` The integration tests require the source to have been built. The e2e tests do as well, but are already running this in a different way. There isn't much of a clean separation of the test config by test type, so I decided to keep it simple by just adding it as a step on a full `npm run test` run. Technically you could still pull down this repo and start running `vitest` and run into this, but that seems rare enough and I'll document this prerequisite in my next commit. * docs(readme): mention prereq for integration tests See previous commit. Ideally we'd fully automate this but it may not be worth the trouble at the moment.
1 parent 96f8fe7 commit 042e4da

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ create it. These also run nightly and on release PRs.
4040

4141
### Integration testing
4242

43+
> **Prerequisite** Run `npm run build` before running integration tests.
44+
4345
How to add new integration test scenarios to the application:
4446

4547
1. Create a new folder under `tests/fixtures/<your-name>`

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"scripts": {
1616
"prepack": "clean-package",
1717
"postpack": "clean-package restore",
18-
"pretest": "node tests/prepare.mjs",
18+
"pretest": "npm run build && node tests/prepare.mjs",
1919
"build": "node ./tools/build.js",
2020
"build:watch": "node ./tools/build.js --watch",
2121
"lint": "eslint --cache --format=codeframe --max-warnings=0 --ext .ts,.cts,.js src",

0 commit comments

Comments
 (0)