Skip to content

Commit

Permalink
fix: initialize visual regression testing (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbadan authored Dec 10, 2019
1 parent 8b98c72 commit 39c1017
Show file tree
Hide file tree
Showing 175 changed files with 4,195 additions and 4,160 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
*.svg
*.sh
*.md
node_modules/**
node_modules/**
*.png
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ script:
jobs:
include:
- stage: Lint and Test
script: npm run lint && npm run test:coverage && npm run size && npm run test:coveralls
script: npm run lint && npm run size && npm run test:coverage && npm run test:visual && npm run test:coveralls
- stage: Pre-release
if: branch = master
before_deploy:
Expand Down
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ module.exports = {
env: {
cjs: {
plugins: productionPlugins
},
test: {
plugins: ['require-context-hook']
}
}
};
16 changes: 0 additions & 16 deletions config/jest/cssTransform.js

This file was deleted.

32 changes: 0 additions & 32 deletions config/jest/fileTransform.js

This file was deleted.

5 changes: 2 additions & 3 deletions config/jest/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

module.exports = {
'rootDir': '../../',
'rootDir': '../../src/',
'verbose': true,
'testURL': 'http://localhost/',
'testMatch': ['**/*.test.js'],
'setupFiles': ['./config/jest/setup.js'],
'setupFiles': ['../config/jest/setup.js'],
'moduleFileExtensions': ['js', 'json', 'jsx', 'css', 'node'],
'moduleNameMapper': {
'^.+\\.(css)$': 'babel-jest'
Expand Down
3 changes: 3 additions & 0 deletions config/jest/setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Adapter from 'enzyme-adapter-react-16';
import { configure } from 'enzyme';
import registerRequireContextHook from 'babel-plugin-require-context-hook/register';

configure({ adapter: new Adapter() });

Expand All @@ -14,3 +15,5 @@ if (global.document) {
}
});
}

registerRequireContextHook();
Loading

0 comments on commit 39c1017

Please sign in to comment.