Fix the MessagePanel test
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
3c71898237
commit
0363f73e28
3 changed files with 8 additions and 4 deletions
|
@ -24,6 +24,7 @@ var sdk = require('matrix-react-sdk');
|
|||
|
||||
var MessagePanel = sdk.getComponent('structures.MessagePanel');
|
||||
import UserSettingsStore from '../../../src/UserSettingsStore';
|
||||
import MatrixClientPeg from '../../../src/MatrixClientPeg';
|
||||
|
||||
var test_utils = require('test-utils');
|
||||
var mockclock = require('mock-clock');
|
||||
|
@ -51,16 +52,19 @@ describe('MessagePanel', function () {
|
|||
var clock = mockclock.clock();
|
||||
var realSetTimeout = window.setTimeout;
|
||||
var events = mkEvents();
|
||||
var sandbox = null;
|
||||
|
||||
beforeEach(function() {
|
||||
test_utils.beforeEach(this);
|
||||
client = test_utils.createTestClient();
|
||||
sandbox = test_utils.stubClient();
|
||||
client = MatrixClientPeg.get();
|
||||
client.credentials = {userId: '@me:here'};
|
||||
UserSettingsStore.getSyncedSettings = sinon.stub().returns({});
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
clock.uninstall();
|
||||
sandbox.restore();
|
||||
});
|
||||
|
||||
function mkEvents() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue