Skip to content

Commit 1ba70cc

Browse files
committed
Update Jest to 25.4
At the time of writing, CRA uses Jest 24 and React Testing Library. This adds the latest version of Jest for us to use instead of using react-scripts. Update Github workflow to use Jest instead of react-script. Add Babel Runtime and Transform Runtime Plugin to handle async calls in our tests.
1 parent 6aedb33 commit 1ba70cc

File tree

4 files changed

+13673
-8627
lines changed

4 files changed

+13673
-8627
lines changed

.babelrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"presets": ["@babel/preset-env", "@babel/preset-react"]
2+
"presets": ["@babel/preset-env", "@babel/preset-react"],
3+
"plugins": ["@babel/plugin-transform-runtime"]
34
}

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
run: npm install
1818

1919
- name: Running Jest Tests
20-
run: CI=true npm test
20+
run: npm test --ci
2121

2222
- name: Running ESLint
2323
run: npm run lint

0 commit comments

Comments
 (0)