all files / workspace/ test.js

100% Statements 5/5
100% Branches 0/0
100% Functions 1/1
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22                                  
var unit = require('./index.js');
var assert = require('assert');
 
unit('hello world').pipe(
    unit('hello world'),
    unit(/^hello.?world$/),
    unit('hello world', 'message'),
    unit.not({hello: 'world'}),
    unit.not(null),
    unit(null)
);
 
unit({hello: 'world'}).pipe(
    unit({hello: 'world'}),
    unit(function(object) {
        assert.ok(object.hasOwnProperty('hello'));
    }),
    unit.not('hello world'),
    unit.not(/^hello.?world$/),
    unit.not('hello world', 'not message')
);