You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
Stub out the matrix client
This commit is contained in:
@ -3,14 +3,21 @@ var TestUtils = require('react-addons-test-utils');
|
||||
var expect = require('expect');
|
||||
|
||||
var sdk = require('matrix-react-sdk');
|
||||
var MatrixChat;
|
||||
|
||||
var test_utils = require('../../test-utils');
|
||||
var peg = require('../../../src/MatrixClientPeg.js');
|
||||
var q = require('q');
|
||||
|
||||
describe('MatrixChat', function () {
|
||||
var MatrixChat;
|
||||
before(function() {
|
||||
test_utils.stubClient();
|
||||
MatrixChat = sdk.getComponent('structures.MatrixChat');
|
||||
});
|
||||
|
||||
it('gives a login panel by default', function () {
|
||||
peg.get().loginFlows.returns(q({}));
|
||||
|
||||
var res = TestUtils.renderIntoDocument(
|
||||
<MatrixChat config={{}}/>
|
||||
);
|
||||
|
Reference in New Issue
Block a user