Adding Jest for testing
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
const babelOptions = {
|
||||
presets: ['babel-preset-gatsby']
|
||||
};
|
||||
|
||||
module.exports = require('babel-jest').createTransformer(babelOptions);
|
||||
@@ -0,0 +1,8 @@
|
||||
import Enzyme from 'enzyme';
|
||||
import Adapter from 'enzyme-adapter-react-16';
|
||||
|
||||
Enzyme.configure({ adapter: new Adapter() });
|
||||
|
||||
global.___loader = {
|
||||
enqueue: jest.fn()
|
||||
};
|
||||
Reference in New Issue
Block a user