Skip to content

Commit

Permalink
[update] cover all lines of binder
Browse files Browse the repository at this point in the history
  • Loading branch information
toxic-johann committed Apr 21, 2018
1 parent 5dedd93 commit c51ce34
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions __tests__/dispatcher/binder.js
Expand Up @@ -32,4 +32,22 @@ describe('dispatcher/binder', () => {
});
expect(() => player.destroy()).not.toThrow();
});

test('binder triggersync isEventEmitalbe backup', () => {
expect(() => player.__dispatcher.binder.triggerSync({})).not.toThrow();
});

test('binder emitsync isEventEmitalbe backup', () => {
expect(() => player.__dispatcher.binder.emitSync({ name: 'hello' })).not.toThrow();
});

test('prettifyEventParameter without function', () => {
expect(() => {
player.__dispatcher.binder.on({
name: 'what',
target: 'plugin',
stage: 'main',
});
}).toThrow('You must provide a function to handle with event what, but not undefined');
});
});

0 comments on commit c51ce34

Please sign in to comment.