Skip to content

Commit f721714

Browse files
committed
Add enzyme dependency for frontend tests
Signed-off-by: Carlos Martín <carlos.martin.sanchez@gmail.com>
1 parent fb481ea commit f721714

3 files changed

Lines changed: 331 additions & 10 deletions

File tree

frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
"format": "eslint --fix 'src/**/*.js'"
2929
},
3030
"devDependencies": {
31+
"enzyme": "^3.7.0",
32+
"enzyme-adapter-react-16": "^1.7.0",
3133
"eslint-config-airbnb-base": "^12.1.0",
3234
"eslint-config-prettier": "^2.9.0",
3335
"eslint-plugin-jest": "^21.15.1",

frontend/src/setupTests.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import path from 'path';
22
import os from 'os';
33
import 'abortcontroller-polyfill/dist/polyfill-patch-fetch';
4+
import { configure } from 'enzyme';
5+
import Adapter from 'enzyme-adapter-react-16';
46
import initButtonStyles from './utils/bootstrap';
57

8+
configure({ adapter: new Adapter() });
9+
610
const { LocalStorage } = require('node-localstorage');
711
// URL API for node
812
const { URL } = require('whatwg-url');

0 commit comments

Comments
 (0)