first attempt at stubbing tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
8c333dc3f7
commit
f036fd1d0f
1 changed files with 4 additions and 1 deletions
|
@ -18,10 +18,12 @@ var React = require('react');
|
||||||
var ReactDOM = require("react-dom");
|
var ReactDOM = require("react-dom");
|
||||||
var TestUtils = require('react-addons-test-utils');
|
var TestUtils = require('react-addons-test-utils');
|
||||||
var expect = require('expect');
|
var expect = require('expect');
|
||||||
|
import sinon from 'sinon';
|
||||||
|
|
||||||
var sdk = require('matrix-react-sdk');
|
var sdk = require('matrix-react-sdk');
|
||||||
|
|
||||||
var MessagePanel = sdk.getComponent('structures.MessagePanel');
|
var MessagePanel = sdk.getComponent('structures.MessagePanel');
|
||||||
|
import UserSettingsStore from '../../../src/UserSettingsStore';
|
||||||
|
|
||||||
var test_utils = require('test-utils');
|
var test_utils = require('test-utils');
|
||||||
var mockclock = require('mock-clock');
|
var mockclock = require('mock-clock');
|
||||||
|
@ -54,9 +56,10 @@ describe('MessagePanel', function () {
|
||||||
test_utils.beforeEach(this);
|
test_utils.beforeEach(this);
|
||||||
client = test_utils.createTestClient();
|
client = test_utils.createTestClient();
|
||||||
client.credentials = {userId: '@me:here'};
|
client.credentials = {userId: '@me:here'};
|
||||||
|
UserSettingsStore.getSyncedSettings = sinon.stub().returns({});
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(function () {
|
afterEach(function() {
|
||||||
clock.uninstall();
|
clock.uninstall();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue