Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add test framework to web app #33

Merged
merged 4 commits into from
Oct 4, 2023
Merged

Conversation

brunomenezes
Copy link
Collaborator

Summary

Code changes to add Vitest to the web application. I also made changes to the rollups-wagmi generation and entry points declaration.

Changes:

  • Added configuration for Vitest + initial test case for the Web application.
  • Made rollups-wagmi an ESM library instead of focusing on CJS. CJS is still generated, though.
  • Added some explicit TS types declaration to remove some squiggly lines that show up after upgrade, and I also silenced one line for the Ramda pick.

@vercel
Copy link

vercel bot commented Oct 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
rollups-explorer-mainnet ✅ Ready (Inspect) Visit Preview Oct 4, 2023 8:38am
rollups-explorer-sepolia ✅ Ready (Inspect) Visit Preview Oct 4, 2023 8:38am
rollups-explorer-workshop ✅ Ready (Inspect) Visit Preview Oct 4, 2023 8:38am

@brunomenezes
Copy link
Collaborator Author

@tuler
Making rollups-wagmi an ESM module is better than what I did on your branch, which was adding iife format. CI + all the Vercel builds are completed without trouble. I am wondering if we should do the same with the UI package.

The problem I was encountering with the Uint8Array earlier is connected to the test-environment and which types + TextEncoder have been used, I found a Vitest issue here. From 0.34.3 that problem shows up and even in the latest version 0.34.6 it is not working out-of-the-box, so I set the version to 0.34.2 for now. The noble/hashes library that viem uses underneath is a cross-platform thing and not a nodeJS library, so it also adds its own share of problems to that situation. Here is an issue created by a jest contributor I think related to the same problems with TextEncoder + Uint8Array type.

@tuler
Copy link
Member

tuler commented Oct 4, 2023

@tuler Making rollups-wagmi an ESM module is better than what I did on your branch

Should I rebase my ERC-20 branch on top of this? It was ready for review.

@brunomenezes
Copy link
Collaborator Author

@tuler Making rollups-wagmi an ESM module is better than what I did on your branch

Should I rebase my ERC-20 branch on top of this? It was ready for review.

Yeah, if I can get your approval here to merge.

@brunomenezes brunomenezes merged commit 4974b40 into main Oct 4, 2023
3 checks passed
@brunomenezes brunomenezes deleted the chore/add-test-configs branch October 4, 2023 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants