refactor(#637): Migrate testing utilities to Jest pt.1/X #1294
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear ml5 community,
I'm making a Pull Request(PR). Please see the details below.
A good PR π
β Step 1: Describe your Pull Request π
This PR adds the Jest testing framework/library to the ml5-library. This addresses a few elements for me in trying to be intentional about maintainability and approachability of testing for contributors.
I'm advocating for Jest largely because it is both the testing framework (e.g. Mocha or Jasmine) AND the testing assertion library (e.g. Chai) which I think makes it easier to reason about where to look up "how to do X" or "how to mock Y" and helps to create less "stuff" to manage.
It took me ages to finally figure out the differences between Mocha, jasmine, chai, and karma and I found it difficult to understand where the various testing functionalities started and ended. I think I might not be alone on this one!
So! This PR is part of a series of updates that integrates Jest as our testing framework.
I found these blogs helpful for reference: