Closed lomky closed 3 years ago
Reading on testing choices in js. Considering Jest, Mocha, and Jasmine
Conclusion: given our straightforward app I am choosing Jest for ease of setup. Mocha is more powerful but more setup effort, and I don't foresee us needing the extra power. Jasmine might be a good thing to come back to later if our backend app ends up with more complex logic we want to validate, but we can skip it for now since we aren't sure whether we're implementing that logic or it's being done directly in the DB.
Ran into a lot of issues with babel when adding Jest to NextJS
Versions: NextJS 10.0.9 React: 16.14.0 React-dom: 16.14.0
Conclusion: Integration with React 16.14 (and maybe any higher versions) is different than previous versions. Solution
Error:
Quick research dive on Enzyme vs alternatives
Reading:
Notes:
Conclusions:
toJson
capability makes for easy built-into-react snapshot testing - let's go with that.
Description
Integrate a test suite harness into the UI Claim Tracker application. By default we are leaning towards Jest and Enzyme like our previous project, but we should do a bit of research if there is some NextJS bonus or other best practice that has emerged.
Acceptance Criteria