diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-10-18 18:39:36 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-18 11:39:36 +0200 |
commit | 402da46ff611b1a23af07ef0109147d62bf3b9ff (patch) | |
tree | 5fc8c436cad45b5d22b8aa190f29116d2b4550d9 | |
parent | e7099d8d9ede66793d8c26838a33943a93414075 (diff) |
Enable coverage for Jest (#5442)
-rw-r--r-- | jest.config.js | 8 | ||||
-rw-r--r-- | package.json | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/jest.config.js b/jest.config.js index dd9dadf87..50bde57e6 100644 --- a/jest.config.js +++ b/jest.config.js @@ -14,4 +14,12 @@ module.exports = { 'raf/polyfill', ], 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', }; diff --git a/package.json b/package.json index e398730c4..594e42475 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "start": "node ./streaming/index.js", "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:jest": "cross-env NODE_ENV=test jest", + "test:jest": "cross-env NODE_ENV=test jest --coverage", "postinstall": "npm rebuild node-sass" }, "repository": { |