forked from draft-js-plugins/draft-js-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding jest configs and react-testing-library with extra dom assertio…
…ns (draft-js-plugins#1463) * adding jest configs and react-testing-library with extra dom assertions * updating travis.yml, using yarn on scripts and ignoring all storybook extensions on jest * removing yarn version from travis.yml * using isolated setup file for jest, due to colisions on expect() function with chai assertions Co-authored-by: Gabriel <[email protected]>
- Loading branch information
1 parent
d8d07f0
commit 6fb9943
Showing
6 changed files
with
2,277 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
"env": { | ||
"browser": true, | ||
"mocha": true, | ||
"jest": true, | ||
"node": true | ||
}, | ||
"extends": "airbnb", | ||
|
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,7 +1,14 @@ | ||
language: node_js | ||
node_js: | ||
- "8" | ||
sudo: false | ||
- "12.13.0" | ||
cache: | ||
yarn: true | ||
directories: node_modules | ||
|
||
install: | ||
- yarn install | ||
|
||
script: | ||
- npm test | ||
- npm run lint | ||
- yarn test | ||
- yarn test:jest | ||
- yarn lint |
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,18 @@ | ||
// For a detailed explanation regarding each configuration property, visit: | ||
// https://jestjs.io/docs/en/configuration.html | ||
|
||
module.exports = { | ||
testEnvironment: 'jsdom', | ||
setupFilesAfterEnv: ['<rootDir>/jestHelper.js'], | ||
moduleFileExtensions: ['jsx', 'js'], | ||
transform: { | ||
'^.+\\.(js|jsx)$': 'babel-jest', | ||
}, | ||
moduleDirectories: ['node_modules', 'src'], | ||
testPathIgnorePatterns: ['./node_modules/'], | ||
collectCoverageFrom: [], | ||
coveragePathIgnorePatterns: ['.stories.*'], | ||
coverageThreshold: { | ||
global: {}, | ||
}, | ||
}; |
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 @@ | ||
import '@testing-library/jest-dom/extend-expect'; |
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
Oops, something went wrong.