Skip to content

Commit

Permalink
update app to be able to run tests via npm test
Browse files Browse the repository at this point in the history
  • Loading branch information
amanda-yee committed Sep 15, 2024
1 parent 7652d80 commit 86ba62d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@testing-library/user-event": "^13.5.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-scripts": "5.0.1",
"react-scripts": "^5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
8 changes: 8 additions & 0 deletions code/src/__tests__/sample.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// To be deleted later
test('simple math test', () => {
expect(1 + 1).toBe(2);
});

test('simple math test 2', () => {
expect(1 + 1).toBe(3); // expected fail
});

0 comments on commit 86ba62d

Please sign in to comment.