Skip to content

Commit

Permalink
Updating unit tests
Browse files Browse the repository at this point in the history
Former-commit-id: 706b4d9
  • Loading branch information
ycombinator committed Jun 20, 2016
1 parent 6f175f7 commit c8bf8b0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/server/status/__tests__/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ describe('Status class', function () {
it('emits change when the status is set', function (done) {
let status = serverStatus.createForPlugin(plugin);

status.once('change', function (prev, prevMsg) {
expect(status.state).to.be('green');
expect(status.message).to.be('GREEN');
expect(prev).to.be('uninitialized');

status.once('change', function (prev, prevMsg) {
expect(status.state).to.be('red');
expect(status.message).to.be('RED');
expect(prev).to.be('green');
status.once('change', function (prevState, prevMsg, newState, newMsg) {
expect(newState).to.be('green');
expect(newMsg).to.be('GREEN');
expect(prevState).to.be('uninitialized');

status.once('change', function (prevState, prevMsg, newState, newMsg) {
expect(newState).to.be('red');
expect(newMsg).to.be('RED');
expect(prevState).to.be('green');
expect(prevMsg).to.be('GREEN');

done();
Expand Down

0 comments on commit c8bf8b0

Please sign in to comment.