🐍🐍🐍 Don't fear the sneks. 🐍🐍🐍
Born from a project where full-featured testing frameworks placed unwanted restrictions on a test.
- Test small scripts with small testing frameworks, test large projects with large testing frameworks.
- Failing a setup or teardown function should fail the whole program, but not the test.
- Scoping is the responsibility of the engineer.
- Ordering is the responsibility of the engineer.
- Failing fast means better tests. Proactive testing is better.
- More emoji is better than less emoji.
# NPM
npm install --save-dev slither-js
# YARN
yarn add slither-js --dev
import Slither, { pass, fail } from 'slither-js';
Slither.setup('Setting things up', () => {
// Do some setup stuff
});
Slither.test('Testing things', () => {
// Call pass() or fail()
});
Slither.teardown('Clean stuff up', () => {
// Undo the setup
});
Slither.run();
$ ./node_modules/.bin/babel-node specFile.js
...
See the project tests for examples.