-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Integrate Jest for JavaScript testing with CI setup (#28)
Co-authored-by: sourcery-ai[bot] <sourcery-ai[bot]@users.noreply.github.com> Co-authored-by: Fabian Braun <[email protected]>
- Loading branch information
1 parent
badded7
commit 2a3ba24
Showing
15 changed files
with
12,636 additions
and
6,661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Jest coverage | ||
/coverage | ||
*.py[cod] | ||
*$py.class | ||
*.egg-info | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
presets: [ | ||
['@babel/preset-env', { | ||
targets: { | ||
node: 'current', | ||
}, | ||
}], | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
testEnvironment: 'jsdom', | ||
setupFilesAfterEnv: ['<rootDir>/tests/js/setup-tests.js'], | ||
moduleNameMapper: { | ||
'\\.(css|less|scss|sass)$': '<rootDir>/tests/js/__mocks__/styleMock.js', | ||
'\\.(gif|ttf|eot|svg)$': '<rootDir>/tests/js/__mocks__/fileMock.js' | ||
}, | ||
testMatch: [ | ||
'**/tests/js/**/*.test.js' | ||
], | ||
coverageDirectory: 'coverage', | ||
collectCoverageFrom: [ | ||
'private/js/**/*.js', | ||
'!**/node_modules/**' | ||
] | ||
}; |
Oops, something went wrong.