Skip to content

Commit

Permalink
Ensure * event still works
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Jun 30, 2017
1 parent 0e38027 commit fe876d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/robot.js
Expand Up @@ -17,7 +17,8 @@ class Robot {
}

receive(event) {
return this.events.emit(event.event, event);
this.events.emit('*', event);
this.events.emit(event.event, event);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/robot.js
Expand Up @@ -51,7 +51,7 @@ describe('Robot', function () {
robot.on('*', spy);

await robot.receive(event);
expect(spy).toNotHaveBeenCalled();
expect(spy).toHaveBeenCalled();
});
});

Expand Down

0 comments on commit fe876d8

Please sign in to comment.