Skip to content

Commit

Permalink
Merge pull request #1063 from storybooks/am-update-jest-config
Browse files Browse the repository at this point in the history
chore(jest): update to v20's default configuration file
  • Loading branch information
ndelangen committed May 19, 2017
2 parents 4ae1b39 + 2cd9154 commit ca12ca6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 29 deletions.
23 changes: 0 additions & 23 deletions .jestrc.json

This file was deleted.

14 changes: 14 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
cacheDirectory: '.cache/jest',
clearMocks: true,
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
'\\.(css|scss)$': '<rootDir>/__mocks__/styleMock.js',
},
projects: ['<rootDir>/packages/*', '<rootDir>/examples/*'],
collectCoverage: false,
collectCoverageFrom: ['packages/**/*.{js,jsx}', '!**/generators/**'],
coverageDirectory: 'coverage',
testEnvironment: 'jsdom',
setupTestFrameworkScriptFile: './node_modules/jest-enzyme/lib/index.js',
};
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,24 @@
"babel-preset-stage-0": "^6.24.1",
"codecov": "^2.1.0",
"enzyme": "^2.8.2",
"enzyme-to-json": "^1.5.1",
"eslint": "^3.19.0",
"eslint-config-airbnb-base": "^11.1.3",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jest": "^20.0.0",
"eslint-plugin-jest": "^20.0.3",
"eslint-plugin-prettier": "^2.0.1",
"jest": "^20.0.0",
"jest-enzyme": "^3.1.0",
"jest": "^20.0.3",
"jest-enzyme": "^3.1.1",
"lerna": "2.0.0-rc.4",
"prettier": "^1.3.0",
"react": "^15.5.4",
"react-addons-test-utils": "^15.5.1",
"react-test-renderer": "^15.5.4",
"react-dom": "^15.5.4",
"shelljs": "^0.7.7"
},
"scripts": {
"bootstrap": "lerna bootstrap",
"lint": "eslint .",
"test": "jest --config ./.jestrc.json",
"test": "jest",
"test:watch": "npm test -- --watch",
"coverage": "codecov",
"postinstall": "opencollective postinstall"
Expand Down

0 comments on commit ca12ca6

Please sign in to comment.