mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-04 19:56:45 +02:00
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.
This commit is contained in:
parent
587325b36c
commit
289f8ab439
@ -60,14 +60,13 @@ describe('RoomView', function () {
|
||||
peg.get().getProfileInfo.returns(q({displayname: "foo"}));
|
||||
var roomView = ReactDOM.render(<RoomView roomAddress="#alias:ser.ver" />, 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();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user