-
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-setup
under thetesting
folder and add configuration. Copy the example linked below and add potential improvements.- adjust
coverage.reportDirectory
to be at project root (packages/<name>/.coverage
) - add unit tests
- use existing types see this comment
- add minimal docs to the
test-vitest-setup
project on how to use
- adjust
Example implementation:
PR1.2
- Extend
vitest.{targetName}.config.ts
fromtest-vitest-setup
configuration. (consider the changedreportDirectory
may 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/mock
tomodels/mocks
- Rename
examples/plugins/src/lighthouse/mock
toexamples/plugins/src/lighthouse/mocks
- After all folders are renamed to
mocks
adjust inputs innx.json
- Move
zod2md.ts
under{projectRoot}/tools
and make sure"!{projectRoot}/tools/**/*"
is added undernx.json#namedInputs.production