0.8.0 ā€¢ Published 7 years ago

slither-js v0.8.0

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

slither-js Build Status

šŸšŸšŸ Don't fear the sneks. šŸšŸšŸ

Motivation

Born from a project where full-featured testing frameworks placed unwanted restrictions on a test.

Principles

  • 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.

Installation

# NPM
npm install --save-dev slither-js

# YARN
yarn add slither-js --dev

Usage

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.

0.8.0

7 years ago

0.7.0

7 years ago

0.6.0

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago