We need to integrate the old Python tests into our rewritten JavaScript app. There are multiple competing JavaScript frameworks that suit our basic needs:
Jasmine & Mocha
Jasmine and Mocha are no-goes for us as they don't offer support for the most recent versions of Javascript.
Jest
Jest looks really good on paper but requires more dependencies than Ava and its extra features are redundant for our project. The Jest syntax is also quite outdated.
Ava
Ava is our framework of choice for migrating our tests to a new language. This is due to its ease of setup and use. Ava can be installed using a single command. Its syntax is the most elegant out of the bunch.
Sample Ava test:
import test from 'ava';
test('Sum numbers', t => {
const sum = 1 + 2;
const expectedResult = 3;
t.equal(sum, expectedResult);
});
We need to integrate the old Python tests into our rewritten JavaScript app. There are multiple competing JavaScript frameworks that suit our basic needs:
Jasmine & Mocha
Jasmine and Mocha are no-goes for us as they don't offer support for the most recent versions of Javascript.
Jest
Jest looks really good on paper but requires more dependencies than Ava and its extra features are redundant for our project. The Jest syntax is also quite outdated.
Ava
Ava is our framework of choice for migrating our tests to a new language. This is due to its ease of setup and use. Ava can be installed using a single command. Its syntax is the most elegant out of the bunch.
Sample Ava test:
References: https://blog.logrocket.com/the-best-unit-testing-frameworks-for-node-js/ https://blog.risingstack.com/node-hero-node-js-unit-testing-tutorial/