question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

chore: Rewrite tests to AVA

See original GitHub issue

Is 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:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
xxczakicommented, May 24, 2020

@curtisjohnson1 I already started it in #833. There is a TODO list, pick something and let me know so that I can update it 😉

1reaction
curtnuxcommented, May 24, 2020

@xxczaki - Great, assign me to main. I’ll make a start on it

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found