mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
Introduced separate config for e2e tests
refs https://github.com/TryGhost/Toolbox/issues/475 - Having a single coverage config file for unit and e2e type of tests doesn't play well for tracking coverage progress. The unit test ones are run often when developing, so one can observe the changes in coverage. The e2e tests are ran mostly on CI environment and have different purposes/reach comparing to unit tests.
This commit is contained in:
parent
a1b5830269
commit
3e0ec26408
1
.gitignore
vendored
1
.gitignore
vendored
@ -18,6 +18,7 @@ lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
coverage-e2e
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
21
ghost/core/.c8rc.e2e.json
Normal file
21
ghost/core/.c8rc.e2e.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"all": true,
|
||||
"check-coverage": true,
|
||||
"reporter": [
|
||||
"html-spa",
|
||||
"text-summary",
|
||||
"cobertura"
|
||||
],
|
||||
"reportsDir": "./coverage-e2e",
|
||||
"statements": 78,
|
||||
"branches": 80,
|
||||
"functions": 80,
|
||||
"lines": 78,
|
||||
"include": [
|
||||
"core/{*.js,frontend,server,shared}"
|
||||
],
|
||||
"exclude": [
|
||||
"core/server/data/migrations/**",
|
||||
"!core/server/data/migrations/utils.js"
|
||||
]
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
"cobertura"
|
||||
],
|
||||
"statements": 61,
|
||||
"branches": 80,
|
||||
"branches": 85,
|
||||
"functions": 51,
|
||||
"lines": 61,
|
||||
"include": [
|
||||
|
@ -33,7 +33,8 @@
|
||||
"test:e2e": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/e2e-api' './test/e2e-frontend' './test/e2e-server' './test/e2e-webhooks' --timeout=15000",
|
||||
"test:regression": "mocha --require=./test/utils/overrides.js --exit --trace-warnings --recursive --extension=test.js './test/regression' --timeout=60000",
|
||||
"test:browser": "playwright test --browser=all test/e2e-browser",
|
||||
"test:ci": "c8 yarn test:e2e -b && yarn test:integration -b && yarn test:regression -b",
|
||||
"test:ci": "c8 -c ./.c8rc.e2e.json yarn test:ci:base",
|
||||
"test:ci:base": "yarn test:e2e -b",
|
||||
"test:unit:slow": "yarn test:unit --reporter=mocha-slow-test-reporter",
|
||||
"test:int:slow": "yarn test:integration --reporter=mocha-slow-test-reporter",
|
||||
"test:e2e:slow": "yarn test:e2e --reporter=mocha-slow-test-reporter",
|
||||
|
Loading…
Reference in New Issue
Block a user