Skip to content

Commit

Permalink
simplified assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
larsthorup committed Jan 16, 2015
1 parent 0fd3935 commit 2c60d2f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion test/end2end/scenario.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,17 @@ describe('scenario in process', function () {
});

it('should notify', function () {
return api.nextMessage().should.eventually.become('{"path":"/entry/1","fromVersion":"1","patch":{"title":"newTitle","version":2},"toVersion":"2","verb":"EVENT","type":"PATCH"}');
return api.nextMessage().should.eventually.become({
verb: 'EVENT',
type: 'PATCH',
path: '/entry/1',
fromVersion: '1',
patch: {
title:'newTitle',
version: 2
},
toVersion: '2'
});
});

});
Expand Down
2 changes: 1 addition & 1 deletion test/util/api.proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function starting() {
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
ws = new WebSocket('wss://localhost:1719');
ws.on('message', function (data) {
messageChannel.put(data);
messageChannel.put(JSON.parse(data));
});
return new Promise(function (resolve) {
ws.on('open', resolve);
Expand Down

0 comments on commit 2c60d2f

Please sign in to comment.