The more code you have on the client side, the more it becomes a liability. For server-side code, there’s the well-entrenched unit tests, and for JavaScript, we have QUnit
(https://qunitjs.com), which Odoo uses.
Writing tests for client-side code
Getting ready
We’ll add our tests to the addon developed in the previous recipes, so grab the code from the Making RPC calls to the server recipe and put it in a new module called r4_tests.
How to do it...
We have to add our test file and make it known to the test mechanism in the appropriate template:
- Add the static...