diff --git a/package-lock.json b/package-lock.json
index 2e50e35..edc1f38 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,7 +11,7 @@
"@tatumio/tatum": "^4.1.34",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/user-event": "^13.5.0",
+ "@testing-library/user-event": "^14.5.2",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.68",
"@types/react": "^18.2.46",
@@ -3983,14 +3983,11 @@
}
},
"node_modules/@testing-library/user-event": {
- "version": "13.5.0",
- "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-13.5.0.tgz",
- "integrity": "sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==",
- "dependencies": {
- "@babel/runtime": "^7.12.5"
- },
+ "version": "14.5.2",
+ "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.2.tgz",
+ "integrity": "sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==",
"engines": {
- "node": ">=10",
+ "node": ">=12",
"npm": ">=6"
},
"peerDependencies": {
diff --git a/package.json b/package.json
index 5cc5970..225df25 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
"@tatumio/tatum": "^4.1.34",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
- "@testing-library/user-event": "^13.5.0",
+ "@testing-library/user-event": "^14.5.2",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.68",
"@types/react": "^18.2.46",
diff --git a/src/App.test.tsx b/src/App.test.tsx
index 3ae3310..18a5207 100644
--- a/src/App.test.tsx
+++ b/src/App.test.tsx
@@ -3,6 +3,13 @@ import App from './App';
test('should render Ethereum Wallet headline', () => {
render(
Hash: {transaction.hash}
Amount: {transaction.amount}
Timestamp: {new Date(transaction.timestamp).toLocaleString()}
diff --git a/src/WalletPage.test.tsx b/src/WalletPage.test.tsx new file mode 100644 index 0000000..75736f7 --- /dev/null +++ b/src/WalletPage.test.tsx @@ -0,0 +1,46 @@ +import { act, render, screen, waitFor } from '@testing-library/react'; +import { WalletPage } from './WalletPage'; +import userEvent from '@testing-library/user-event'; + +test('should return nothing for non-existing wallet address', async () => { + const user = userEvent.setup(); + + render(