Add more tests for the useWallet hook.
This diff introduces automated testing of localforage interaction. This will provide a baseline for future refactors of useWallet.js, demonstrating that expected behavior is preserved.
Differential D15351
[Cashtab] Better testing of useWallet hook bytesofman on Jan 31 2024, 22:38. Authored by Tags None Subscribers None
Details
Add more tests for the useWallet hook. This diff introduces automated testing of localforage interaction. This will provide a baseline for future refactors of useWallet.js, demonstrating that expected behavior is preserved. npm test
Diff Detail
Event TimelineComment Actions Build Bitcoin ABC Diffs / Diff Testing (cashtab-tests) failed.
Tail of the build log: /work/cashtab /work/abc-ci-builds/cashtab-tests npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: qrcode.react@1.0.1 npm ERR! Found: react@18.2.0 npm ERR! node_modules/react npm ERR! react@"^18.2.0" from the root project npm ERR! peer react@">=16.0.0" from @ant-design/cssinjs@1.18.4 npm ERR! node_modules/@ant-design/cssinjs npm ERR! @ant-design/cssinjs@"^1.18.4" from antd@5.13.3 npm ERR! node_modules/antd npm ERR! antd@"^5.13.3" from the root project npm ERR! 52 more (@ant-design/icons, @ant-design/react-slick, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^15.5.3 || ^16.0.0 || ^17.0.0" from qrcode.react@1.0.1 npm ERR! node_modules/qrcode.react npm ERR! qrcode.react@"^1.0.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: react@17.0.2 npm ERR! node_modules/react npm ERR! peer react@"^15.5.3 || ^16.0.0 || ^17.0.0" from qrcode.react@1.0.1 npm ERR! node_modules/qrcode.react npm ERR! qrcode.react@"^1.0.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See /root/.npm/eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2024-01-31T22_39_07_057Z-debug-0.log Build cashtab-tests failed with exit code 1 Comment Actions Build Bitcoin ABC Diffs / Diff Testing (cashtab-tests) failed.
Tail of the build log: /work/cashtab /work/abc-ci-builds/cashtab-tests npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: qrcode.react@1.0.1 npm ERR! Found: react@18.2.0 npm ERR! node_modules/react npm ERR! react@"^18.2.0" from the root project npm ERR! peer react@">=16.0.0" from @ant-design/cssinjs@1.18.4 npm ERR! node_modules/@ant-design/cssinjs npm ERR! @ant-design/cssinjs@"^1.18.4" from antd@5.13.3 npm ERR! node_modules/antd npm ERR! antd@"^5.13.3" from the root project npm ERR! 52 more (@ant-design/icons, @ant-design/react-slick, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^15.5.3 || ^16.0.0 || ^17.0.0" from qrcode.react@1.0.1 npm ERR! node_modules/qrcode.react npm ERR! qrcode.react@"^1.0.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: react@17.0.2 npm ERR! node_modules/react npm ERR! peer react@"^15.5.3 || ^16.0.0 || ^17.0.0" from qrcode.react@1.0.1 npm ERR! node_modules/qrcode.react npm ERR! qrcode.react@"^1.0.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See /root/.npm/eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2024-01-31T22_39_42_205Z-debug-0.log Build cashtab-tests failed with exit code 1 |