| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1× 1× 1× 1× 1× | 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')
);
|