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

Replace Karma with another runner for browser tests #232

Closed
frankhinek opened this issue Sep 29, 2023 · 5 comments
Closed

Replace Karma with another runner for browser tests #232

frankhinek opened this issue Sep 29, 2023 · 5 comments
Assignees
Labels
testing related to new or existing tests

Comments

@frankhinek
Copy link
Contributor

Rationale:

  • Karma was deprecated on Apr 27, 2023
  • Post deprecation, the project is "not accepting new features or general bug fixes.".
  • Web5 SDK JS browser tests frequently timeout, particularly with Webkit, and have required significantly increasing the timeout on many of the Mocha/Chai tests (5, 10, and even 30 seconds). Despite this some tests still timeout. This leads to aggregate CI runtimes to be lengthened considerably.
  • Web5 SDK JS browser tests take 20+ minutes to complete under GitHub CI which results in slow feedback loops.

Work to be done:

  • First, propose a new approach/solution and get feedback from the project maintainers. Once an approach is agreed upon, then proceed with modifying the SDK repos and submit a PR. There are a number of other changes being contemplated with respect to tests, so that context should be incorporated in the plan to replace Karma.
@frankhinek frankhinek added the testing related to new or existing tests label Sep 29, 2023
@michaelneale
Copy link
Contributor

its probably a little out dated but jasmine was my pick back in the day. Looking now Jest seems more popular (if that counts for anything)

@frankhinek
Copy link
Contributor Author

frankhinek commented Sep 29, 2023

Yea, Jest is still popular but it seems a lot of projects are migrating away. One of the reason some seem to be gravitating towards Vitest is that the API is fully Jest compatible. And it also supports the expect style tests from Chai, which means we wouldn't have to rewrite many of our tests to migrate.

Also Moe hates Jest so we had steered away from it early on 😄

@shamilovtim
Copy link
Member

Did a deep dive and my conclusion is Jest is the way to go
TBD Testing Migration.pdf

@shamilovtim
Copy link
Member

shamilovtim commented Nov 27, 2023

Found a way to replace Karma with zero changes to the test suite: https://github.com/TBD54566975/web5-js/pull/316/files. Still not as good as using Jest. But very simple to do.

@frankhinek
Copy link
Contributor Author

Closing since Karma was replaced with Web Test Runner in #316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing related to new or existing tests
Projects
None yet
Development

No branches or pull requests

3 participants