From 289f8ab439c4d4154fd2c0e23522372e7a7382f3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 8 Dec 2016 18:44:38 +0000 Subject: [PATCH] Fix failing test For some reason, update webpack causes the promise to no longer complete by the next tick. Change the test to not depend on how fast the promise goes through. --- test/components/structures/RoomView-test.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/components/structures/RoomView-test.js b/test/components/structures/RoomView-test.js index a41490d596..3522c41e32 100644 --- a/test/components/structures/RoomView-test.js +++ b/test/components/structures/RoomView-test.js @@ -60,14 +60,13 @@ describe('RoomView', function () { peg.get().getProfileInfo.returns(q({displayname: "foo"})); var roomView = ReactDOM.render(, parentDiv); - peg.get().joinRoom = sinon.spy(); + peg.get().joinRoom = function(x) { + expect(x).toEqual('#alias:ser.ver'); + done(); + } process.nextTick(function() { roomView.onJoinButtonClicked(); - process.nextTick(function() { - expect(peg.get().joinRoom.calledWith('#alias:ser.ver')).toExist(); - done(); - }); }); }); });