Adding Unit Test for JS and HTML
Author: Andrew-Chen-WangCreated Aug 23, 2020Updated Aug 10, 2026
Labelsenhancement
Description
I'm looking to add sample unit tests for JS and HTML. This can be implemented if the compose file included npm and if we gave a sample test file and javascript code that demonstrates how to unit test.
Rationale
I've been implementing JS for a bit in my new website, and the amount of Ajax code I wrote became painstakingly difficult to maintain as new features evolved.
Use case(s) / visualization(s)
Implementing unit test allows for more test driven code to be implemented not only in the backend but also the frontend.
Source: cookiecutter/cookiecutter-django