flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
35
VISUALIZACION/node_modules/ngraph.events/test/errors.js
generated
vendored
Executable file
35
VISUALIZACION/node_modules/ngraph.events/test/errors.js
generated
vendored
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
var test = require('tap').test,
|
||||
eventify = require('..');
|
||||
|
||||
test('Eventify protects your object', function(t) {
|
||||
t.plan(1);
|
||||
try {
|
||||
eventify({
|
||||
on: "I'm a dummy string, please don't wipe me out"
|
||||
});
|
||||
} catch (e) {
|
||||
t.ok(true, 'Eventify should thrown an exception to protect your object');
|
||||
}
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Eventify does not allow falsy objects', function(t) {
|
||||
t.plan(1);
|
||||
try {
|
||||
eventify(false);
|
||||
} catch (e) {
|
||||
t.ok(true, 'Eventify should thrown an exception to protect your object');
|
||||
}
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Eventify does not allow to subscribe without function', function(t) {
|
||||
t.plan(1);
|
||||
var subject = eventify({});
|
||||
try {
|
||||
subject.on('foo')
|
||||
} catch (e) {
|
||||
t.ok(true, 'Eventify should thrown an exception: no function is specified');
|
||||
}
|
||||
t.end();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue