Testing Vanilla Javascript

Testing vanilla Javascript is not as straightforward and laid out as React or other frameworks, so it takes some finangling.

Node.js

Most simple would be to use a node environment only for the tests. To do this, you can use Jasmine[3], a zero-dependencies test tunner that has language very similar to Jest.

References

  1. https://dev.to/thawkin3/how-to-unit-test-html-and-vanilla-javascript-without-a-ui-framework-4io
  2. https://dev.to/aurelkurtula/unit-testing-with-vanilla-javascript-the-very-basics-7jm
  3. https://jasmine.github.io/pages/getting_started.html

Last modified: 202204110359