Skip to content

Commit 49cce64

Browse files
committed
Start testing React Componenets
1 parent efc93af commit 49cce64

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ module.exports = {
77
node: 'current'
88
}
99
}
10-
]
10+
], '@babel/preset-react'
1111
]
1212
};

package.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,28 @@
6666
"@lumino/dragdrop": "^1.7.1",
6767
"@lumino/messaging": "^1.4.3",
6868
"@lumino/properties": "^1.2.3",
69-
"@lumino/signaling": "^1.4.3"
69+
"@lumino/signaling": "^1.4.3",
70+
"@lumino/widgets": "^1.13.2",
71+
"@types/react": "^16.9.56"
7072
},
7173
"devDependencies": {
7274
"@jupyterlab/builder": "^3.0.0-rc.13",
7375
"@typescript-eslint/eslint-plugin": "^2.27.0",
7476
"@typescript-eslint/parser": "^2.27.0",
7577
"eslint": "^7.5.0",
7678
"@babel/core": "^7",
77-
"@babel/preset-env": "^7",
79+
"@babel/preset-env": "^7.12.1",
80+
"@babel/preset-react": "^7.12.5",
7881
"@testing-library/react": "^11.1.1",
82+
"@types/enzyme": "^3.10.8",
83+
"@types/enzyme-adapter-react-16": "^1.0.6",
7984
"@types/jest": "^26.0.15",
85+
"@types/node-fetch": "^2.5.7",
86+
"@types/react-dom": "^16.9.9",
87+
"@types/react-test-renderer": "^16.9.3",
88+
"babel-jest": "^26.6.3",
89+
"enzyme": "^3.11.0",
90+
"enzyme-adapter-react-16": "^1.15.5",
8091
"eslint-config-prettier": "^6.10.1",
8192
"eslint-plugin-prettier": "^3.1.2",
8293
"eslint-plugin-react": "^7.20.4",

testutils/jest-setup-files.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
import { configure } from 'enzyme';
2+
import Adapter from 'enzyme-adapter-react-16';
3+
14
global.fetch = require('jest-fetch-mock');
5+
configure({ adapter: new Adapter() });
6+

0 commit comments

Comments
 (0)