Skip to content

Commit b8ec979

Browse files
committed
add useApi tests
1 parent c6b01f9 commit b8ec979

File tree

7 files changed

+3069
-25
lines changed

7 files changed

+3069
-25
lines changed

jest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} */
2+
module.exports = {
3+
preset: 'ts-jest',
4+
testEnvironment: 'jsdom',
5+
};

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"scripts": {
1313
"watch": "parcel watch",
1414
"build": "parcel build",
15-
"test": "echo \"Error: no test specified\" && exit 1"
15+
"test": "jest"
1616
},
1717
"keywords": [
1818
"react",
@@ -26,9 +26,15 @@
2626
"devDependencies": {
2727
"@parcel/packager-ts": "^2.8.3",
2828
"@parcel/transformer-typescript-types": "^2.8.3",
29+
"@testing-library/react": "^14.0.0",
30+
"@types/jest": "^29.4.0",
2931
"@types/react": "^18.0.27",
32+
"jest": "^29.5.0",
33+
"jest-environment-jsdom": "^29.5.0",
3034
"parcel": "^2.8.3",
3135
"react": "^18.2.0",
36+
"react-dom": "^18.2.0",
37+
"ts-jest": "^29.0.5",
3238
"typescript": "^4.9.4"
3339
},
3440
"peerDependencies": {

0 commit comments

Comments
 (0)