-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
Introduce test-vitest-setup project to handle test setup for vite tests
PR1
- Introduce project
test-vitest-setupunder thetestingfolder and add configuration. Copy the example linked below and add potential improvements.- adjust
coverage.reportDirectoryto be at project root (packages/<name>/.coverage) - add unit tests
- use existing types see this comment
- add minimal docs to the
test-vitest-setupproject on how to use
- adjust
Example implementation:
PR1.2
- Extend
vitest.{targetName}.config.tsfromtest-vitest-setupconfiguration. (consider the changedreportDirectorymay be a breaking change for the CI pipeline)- unit tests
- int tests
- e2e tests
PR2
- improve test coverage config, exclude index.ts
- remove vitest executor defaults from
nx.json
"@nx/vite:test": {
"cache": true,
"inputs": ["default", "test-vitest-inputs"],
"options": {
"passWithNoTests": true,
"watch": false
}
},- Rename
nx-plugin/mocktomodels/mocks - Rename
examples/plugins/src/lighthouse/mocktoexamples/plugins/src/lighthouse/mocks - After all folders are renamed to
mocksadjust inputs innx.json - Move
zod2md.tsunder{projectRoot}/toolsand make sure"!{projectRoot}/tools/**/*"is added undernx.json#namedInputs.production