mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-25 15:09:29 +00:00
Enable coverage for Jest (#5442)
This commit is contained in:
parent
e7099d8d9e
commit
402da46ff6
|
@ -14,4 +14,12 @@ module.exports = {
|
||||||
'raf/polyfill',
|
'raf/polyfill',
|
||||||
],
|
],
|
||||||
setupTestFrameworkScriptFile: '<rootDir>/app/javascript/mastodon/test_setup.js',
|
setupTestFrameworkScriptFile: '<rootDir>/app/javascript/mastodon/test_setup.js',
|
||||||
|
collectCoverageFrom: [
|
||||||
|
'app/javascript/mastodon/**/*.js',
|
||||||
|
'!app/javascript/mastodon/features/emoji/emoji_compressed.js',
|
||||||
|
'!app/javascript/mastodon/locales/locale-data/*.js',
|
||||||
|
'!app/javascript/mastodon/service_worker/entry.js',
|
||||||
|
'!app/javascript/mastodon/test_setup.js',
|
||||||
|
],
|
||||||
|
coverageDirectory: '<rootDir>/coverage',
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"start": "node ./streaming/index.js",
|
"start": "node ./streaming/index.js",
|
||||||
"test": "npm run test:lint && npm run test:jest",
|
"test": "npm run test:lint && npm run test:jest",
|
||||||
"test:lint": "eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ spec/javascript/ streaming/",
|
"test:lint": "eslint -c .eslintrc.yml --ext=js app/javascript/ config/webpack/ spec/javascript/ streaming/",
|
||||||
"test:jest": "cross-env NODE_ENV=test jest",
|
"test:jest": "cross-env NODE_ENV=test jest --coverage",
|
||||||
"postinstall": "npm rebuild node-sass"
|
"postinstall": "npm rebuild node-sass"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Reference in a new issue