Open jokeyrhyme opened 7 years ago
Proposal is to detect ava, mocha, jest, jasmine, tape, and other popular test frameworks. If none of these exist, then install a preferred test framework and copy in basic skeleton files so the developer can get started more quickly.
ava
each test file executes in its own process (easy environment isolation)
test files are auto-transpiled with babel and power assertions
tests execute concurrently (non-deterministic sequence) by default
provides runner and assertions in 1 devDependencies entry
mocks and coverage via 2 extra devDependencies
provides assertion for auto-snapshot testing
npm install pulls down babel and half the NPM eco-system
npm install
runner does not execute in the browser (but tests could hit browser automation APIs)
runner provides grouping and before/after each/all functionality
jest
supported by Facebook
provides runner, assertions, mocks, and coverage all in 1 devDependencies entry
assertions smell like BDD (but at least they are isDoneCorrectly(), not is.done.correctly)
isDoneCorrectly()
is.done.correctly
mocha
provides runner in 1 devDependencies
assertions, mocks, and coverage via 3 extra devDependencies
runner executes in both Node.js and the browser
tape
provides runner and assertions in 1 devDependencies
mocks and coverage via 3 extra devDependencies
Please vote with reaction / emoji things on subsequent comments
OPTION: ava
OPTION: jest
OPTION: mocha
OPTION: tape
Proposal is to detect ava, mocha, jest, jasmine, tape, and other popular test frameworks. If none of these exist, then install a preferred test framework and copy in basic skeleton files so the developer can get started more quickly.
ava
each test file executes in its own process (easy environment isolation)
test files are auto-transpiled with babel and power assertions
tests execute concurrently (non-deterministic sequence) by default
provides runner and assertions in 1 devDependencies entry
mocks and coverage via 2 extra devDependencies
provides assertion for auto-snapshot testing
npm install
pulls down babel and half the NPM eco-systemrunner does not execute in the browser (but tests could hit browser automation APIs)
runner provides grouping and before/after each/all functionality
jest
each test file executes in its own process (easy environment isolation)
supported by Facebook
provides runner, assertions, mocks, and coverage all in 1 devDependencies entry
provides assertion for auto-snapshot testing
assertions smell like BDD (but at least they are
isDoneCorrectly()
, notis.done.correctly
)runner does not execute in the browser (but tests could hit browser automation APIs)
runner provides grouping and before/after each/all functionality
mocha
provides runner in 1 devDependencies
assertions, mocks, and coverage via 3 extra devDependencies
runner executes in both Node.js and the browser
runner provides grouping and before/after each/all functionality
tape
provides runner and assertions in 1 devDependencies
mocks and coverage via 3 extra devDependencies
runner executes in both Node.js and the browser
Please vote with reaction / emoji things on subsequent comments