Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Set up frontend testing #6

Open
futurepaul opened this issue Jan 2, 2023 · 3 comments
Open

Set up frontend testing #6

futurepaul opened this issue Jan 2, 2023 · 3 comments

Comments

@futurepaul
Copy link

I'm creating an issue for this because I'm already down the rabbit hole and it's not going well. Typescript + jest + create react app + craco... a lot of shenanigans for something that should be straightforward.

Tried following this guide but it isn't working for me: https://dev.to/brandonwie/absolute-paths-in-cra-setting-using-craco-feat-typescript-and-ts-jest-2301

Basically, I use typescript path aliases like @compoenent to make imports cleaner. But jest / ts-jest needs to be informed of this because apparently it does its own module resolution.

I'm tempted to cut my losses and migrate the whole thing over to vite / vitest / vite pwa

@TonyGiorgio
Copy link
Contributor

It's not surprising that it'll take more than a few hours to set up an existing project for tests properly. You're just going to have to spend some more time with it. Didn't we already move platforms originally because you ran into a roadblock with vite? There's an entire ecosystem of testing in the react world that you'll just have to bite the bullet and conform to. It's very common that codebase structure needs to change in order to best prioritize testing.

@futurepaul
Copy link
Author

@futurepaul
Copy link
Author

wip here MutinyWallet/mutiny-node#302 (not working yet, but progressing)

@benthecarman benthecarman transferred this issue from MutinyWallet/mutiny-node Feb 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants