1.0.2 • Published 9 years ago

test-aaa v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Test AAA

Build Status

Arrange, Act, Assert because nobody likes messy tests.

Install

npm install --save-dev test-aaa

Use

var aaa = require('test-aaa');

describe('Foo', function () {
  it('should bar', aaa({
    arrange: function () {
      // do stuff and return test subject
    },
    act: function (subject) {
      // act on test subject and return actual value
    },
    assert: function (actual) {
      // assert on the actual value
    }
  }));
});

The aaa function takes a props object with arrange, act, and assert keys and returns a new function that executes arrange, act, and assert in sequence. The arrange function should return the test subject. The act function receives the test subject to act upon it and returns the actual value. Then assert receives the actual value to perform assertions on it.

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago