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

Consolidate testing libraries across the monorepo #818

Closed
5 tasks done
ctrlc03 opened this issue Nov 7, 2023 · 3 comments · Fixed by #819
Closed
5 tasks done

Consolidate testing libraries across the monorepo #818

ctrlc03 opened this issue Nov 7, 2023 · 3 comments · Fixed by #819
Assignees

Comments

@ctrlc03
Copy link
Collaborator

ctrlc03 commented Nov 7, 2023

Currently we are using different testing libraries across the project. Given that the circuits use mocha (circom_tester) and hardhat for the contracts test use mocha too, it seems wise to stop using jest across all other TS packages in favour of Mocha. The changes will be minimum.

  • remove jest @types/jest
  • install mocha ts-mocha @types/mocha chai @types/chai
  • fix all tests
  • change test scripts
  • bonus: run all tests in one command from the root of the monorepo

This would also help with some issues arising when running typedoc on the repo

@ctrlc03 ctrlc03 added this to MACI Nov 7, 2023
@ctrlc03 ctrlc03 converted this from a draft issue Nov 7, 2023
@ctrlc03 ctrlc03 self-assigned this Nov 7, 2023
@ctrlc03 ctrlc03 linked a pull request Nov 8, 2023 that will close this issue
5 tasks
@ctrlc03 ctrlc03 moved this from In Progress to PR Ready to Review in MACI Nov 8, 2023
@samajammin
Copy link
Member

Love it! I suspect this will solve some Jest <> Mocha interface clashing issues I've been facing in this branch: #755 (comment)

My (naive) preference would have been to use Jest over Mocha, given it seems to be overall more popular & better maintained, but if Mocha & Hardhat use Mocha, that sounds like a great reason to just roll with that!

@ctrlc03
Copy link
Collaborator Author

ctrlc03 commented Nov 9, 2023

Love it! I suspect this will solve some Jest <> Mocha interface clashing issues I've been facing in this branch: #755 (comment)

My (naive) preference would have been to use Jest over Mocha, given it seems to be overall more popular & better maintained, but if Mocha & Hardhat use Mocha, that sounds like a great reason to just roll with that!

Yea I see the point of using Jest, we can always switch back and solve the issues between mocha<>jest in case mocha is missing some features that we will need in the future. So far it seems like we can run everything as we did befre with ts-mocha 🙂

@ctrlc03 ctrlc03 added this to the MACI v1.1.1 refactor milestone Nov 10, 2023
@samajammin
Copy link
Member

Fixed by #819

@github-project-automation github-project-automation bot moved this from PR Ready to Review to Done in MACI Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants