Fix a load of warnings in the tests
Stub things out to make the tests not throw warnings, so we can see the actual problems.
This commit is contained in:
parent
515f10bd8b
commit
78c3d5943a
6 changed files with 52 additions and 19 deletions
|
@ -18,6 +18,7 @@ describe('RoomView', function () {
|
|||
var parentDiv;
|
||||
|
||||
beforeEach(function() {
|
||||
test_utils.beforeEach(this);
|
||||
sandbox = test_utils.stubClient();
|
||||
parentDiv = document.createElement('div');
|
||||
|
||||
|
@ -57,11 +58,10 @@ describe('RoomView', function () {
|
|||
it('joins by alias if given an alias', function (done) {
|
||||
peg.get().getRoomIdForAlias.returns(q({room_id: "!randomcharacters:aser.ver"}));
|
||||
peg.get().getProfileInfo.returns(q({displayname: "foo"}));
|
||||
var parentDiv = document.createElement('div');
|
||||
var roomView = ReactDOM.render(<RoomView roomAddress="#alias:ser.ver" />, parentDiv);
|
||||
|
||||
peg.get().joinRoom = sinon.spy();
|
||||
|
||||
|
||||
process.nextTick(function() {
|
||||
roomView.onJoinButtonClicked();
|
||||
process.nextTick(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue