Page MenuHomePhabricator

[Cashtab] Move App to components/App and remove lingering relative imports
ClosedPublic

Authored by bytesofman on Apr 3 2024, 04:25.

Details

Summary

In theory, it makes sense that App.js is at the top level of src/components, with other components one level deeper, as App.js is the parent component.

In practice, it is always confusing to find the tests for App.js, as its test directory appears at the top of src/components, while its fixtures dir is in the middle, then, finally, App.js is below the other directories.

Going forward, may want to reconsider how tests are organized in general. We do not need to use the __tests__ directories in the latest version of jest (which we use now). This though would be another diff.

For now, make the organization make more sense based on practical experience of managing the repo.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Tail of the build log:

Installing mock-chronik-client dependencies...
/work/modules/mock-chronik-client /work/abc-ci-builds/cashtab-tests

added 236 packages, and audited 237 packages in 2s

35 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
/work/cashtab /work/modules/mock-chronik-client /work/abc-ci-builds/cashtab-tests

added 1718 packages, and audited 1719 packages in 31s

262 packages are looking for funding
  run `npm fund` for details

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> cashtab@2.18.2 build
> node scripts/build.js

Creating an optimized production build...
Failed to compile.

Module not found: Error: Can't resolve '../assets/fonts/Poppins-Regular.ttf' in '/work/cashtab/src/components/App'


Build cashtab-tests failed with exit code 1
bytesofman published this revision for review.Apr 3 2024, 04:49
This revision is now accepted and ready to land.Apr 3 2024, 06:35