Opened 7 months ago
Last modified 3 months ago
#6820 new change
Investigate moving away from nodeunit for tests
Reported by: | hfiguiere | Assignee: | |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Core | Keywords: | |
Cc: | greiner, erikvold, sebastian | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description (last modified by hfiguiere)
Background
adblockpluscore uses nodeunit for the testing framework. In May 2018, the package has been marked as deprecated:
https://github.com/caolan/nodeunit/commit/ec2ea882bfb7976c91a25256f855c153594d1b8c
While this doesn't stop it from working, it is a clear indication that it may break in the future.
What to change
- Evaluate a framework replacement
- Update the tests to use that framework
Note
- adblockpluschrome uses qunit with mocha.
Change History (6)
comment:1 Changed 7 months ago by greiner
- Cc greiner added
comment:2 Changed 5 months ago by erikvold
- Cc erikvold added
comment:3 Changed 5 months ago by hfiguiere
- Description modified (diff)
comment:4 Changed 5 months ago by sebastian
- Cc sebastian added
comment:5 Changed 3 months ago by erikvold
Here is a list of the common ones that I have seen used (sorted by currently most popular to least):
- https://www.npmjs.com/package/jest (by facebook)
- https://www.npmjs.com/package/mocha
- https://www.npmjs.com/package/tape
- https://www.npmjs.com/package/ava
- https://www.npmjs.com/package/tap
I like ava fwiw.
comment:6 Changed 3 months ago by erikvold
Here is an "awesome" list:
Note: See
TracTickets for help on using
tickets.
See #6884 for the migration from nodeunit to Mocha in adblockpluschrome, and the reasons for that decision (besides nodeunit being deprecated).
FWIW, I'm not a huge fan of Mocha, but I chose it because (unlike nodeunit) it does the job, and it seems to be the most popular test framework in Node.js environments at the moment.
Where it shines:
What I personally dislike: