chore: Rewrite tests to AVA
See original GitHub issueIs your feature request related to a problem? Please describe.
The current tests are good, however, I don’t really like the fact, that Mocha depends on global variables (it
, describe
). Furthermore, Mocha runs tests serially, which is much slower, especially when there are a lot of tests involved.
AVA runs each test in a separate process and therefore takes advantage of multi-core CPUs.
As we maintain over 200 tests, this will likely require a significant amount of work, but I think it’s something that we should consider, as it will make maintaining the project easier.
It’s also worth mentioning, that we already use AVA in timeout-signal, fetch-blob and fetch-charset-detection.
Describe the solution you’d like
- Migrate from Mocha & Chai to AVA.
- During the process, try and split the huge, 2000 LOC+
test/main.js
file into smaller pieces.
Describe alternatives you’ve considered
N/A
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Effective Automation Tests - Code Confidence - ITNEXT
Tests are there to help, not be a burden or chore to satisfy acceptance criteria. Writing tests is simple with the right approach....
Read more >@jest/core | Yarn - Package Manager
New implementation of node-haste and rewrite of internal module loading and resolution. · Jasmine 2 is now the default test runner. · Added...
Read more >Playwright Tutorial: Getting Started With Playwright Framework
This Playwright tutorial will guide you through the setup of the Playwright framework, which will enable you to write end-to-end tests for ...
Read more >Ava and Mia Unit 8 Flashcards | Quizlet
Study with Quizlet and memorize flashcards containing terms like Stamp, Chore, Label and more.
Read more >node_modules/shelljs/CHANGELOG.md · 4.0.2 · verimag ...
High severity vulnerability in shelljs 0.8.1 #842; Add test for ls() on a ... refactor(test): update AVA and refactor tests #760 (nfischer); chore:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@curtisjohnson1 I already started it in #833. There is a TODO list, pick something and let me know so that I can update it 😉
@xxczaki - Great, assign me to main. I’ll make a start on it