Need advice about which tool to choose?Ask the StackShare community!
AVA vs Karma: What are the differences?
What is AVA? A refined, futuristic test runner. Even though JavaScript is single-threaded, IO in Node.js can happen in parallel due to its async nature. AVA takes advantage of this and runs your tests concurrently, which is especially beneficial for IO heavy tests. In addition, test files are run in parallel as separate processes, giving you even better performance and an isolated environment for each test file.
What is Karma? Spectacular Test Runner for JavaScript. Karma is not a testing framework, nor an assertion library. Karma just launches a HTTP server, and generates the test runner HTML file you probably already know from your favourite testing framework. So for testing purposes you can use pretty much anything you like.
AVA and Karma are primarily classified as "Javascript Testing Framework" and "Browser Testing" tools respectively.
"Simple and fast" is the top reason why over 11 developers like AVA, while over 56 developers mention "Test Runner" as the leading cause for choosing Karma.
AVA and Karma are both open source tools. AVA with 16.4K GitHub stars and 1.07K forks on GitHub appears to be more popular than Karma with 10.7K GitHub stars and 1.61K GitHub forks.
Sellsuki, Coderus, and Repro are some of the popular companies that use Karma, whereas AVA is used by Taboola, Becual.com, and Navendis. Karma has a broader approval, being mentioned in 119 company stacks & 57 developers stacks; compared to AVA, which is listed in 12 company stacks and 10 developer stacks.
Pros of AVA
- Simple and fast12
- Parallel test running6
- Open source5
- Promise support3
- Test code Instrumenting3
- Babel integration2
- ESM Ready1
Pros of Karma
- Test Runner61
- Open source35
- Continuous Integration27
- Great for running tests22
- Test on Real Devices18
- Backed by google11
- Easy Debugging5
- Remote Control2
Sign up to add or upvote prosMake informed product decisions
Cons of AVA
- No built-in support for DOM1
- No source files compilation1
Cons of Karma
- Slow, because tests are run in a real browser1
- Requires the use of hacks to find tests dynamically1