Skip to content

Commit c816abd

Browse files
committed
Add coverage
1 parent f7d4e58 commit c816abd

File tree

5 files changed

+13
-15
lines changed

5 files changed

+13
-15
lines changed

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ module.exports = {
55
project: path.resolve(__dirname, './tsconfig.json'),
66
tsconfigRootDir: __dirname,
77
},
8+
env: {
9+
browser: true,
10+
node: true,
11+
},
812
plugins: ['@typescript-eslint'],
913
extends: [
1014
'eslint:recommended',

.github/workflows/ci.yml renamed to .github/workflows/push.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
88

99
steps:
1010
- uses: actions/checkout@v1
11+
- uses: codecov/[email protected]
12+
with:
13+
token: ${{secrets.CODECOV_TOKEN}}
1114

1215
- name: install dependencies
1316
run: yarn

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ node_modules
77
dist
88
.vscode
99
storybook-static/
10+
coverage/

jest.config.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// For a detailed explanation regarding each configuration property, visit:
2-
// https://jestjs.io/docs/en/configuration.html
3-
41
module.exports = {
52
// All imported modules in your tests should be mocked automatically
63
// automock: false,
@@ -18,7 +15,7 @@ module.exports = {
1815
clearMocks: true,
1916

2017
// Indicates whether the coverage information should be collected while executing the test
21-
// collectCoverage: false,
18+
collectCoverage: false,
2219

2320
// An array of glob patterns indicating a set of files for which coverage information should be collected
2421
// collectCoverageFrom: null,
@@ -27,17 +24,10 @@ module.exports = {
2724
coverageDirectory: 'coverage',
2825

2926
// An array of regexp pattern strings used to skip coverage collection
30-
// coveragePathIgnorePatterns: [
31-
// "/node_modules/"
32-
// ],
27+
coveragePathIgnorePatterns: ['/node_modules/', 'stories'],
3328

3429
// A list of reporter names that Jest uses when writing coverage reports
35-
// coverageReporters: [
36-
// "json",
37-
// "text",
38-
// "lcov",
39-
// "clover"
40-
// ],
30+
coverageReporters: ['json', 'text', 'lcov', 'clover'],
4131

4232
// An object that configures minimum threshold enforcement for coverage results
4333
// coverageThreshold: null,
@@ -177,4 +167,4 @@ module.exports = {
177167

178168
// Whether to use watchman for file crawling
179169
// watchman: true,
180-
};
170+
};

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@
5757
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
5858
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
5959
},
60-
"include": ["src/**/*", "lint-staged.config.js"]
60+
"include": ["src/**/*", "lint-staged.config.js", "jest.config.js"]
6161
}

0 commit comments

Comments
 (0)