From f036fd1d0fe20488dc59ed51563f9ca55942089e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 7 Jul 2017 15:26:55 +0100 Subject: [PATCH] first attempt at stubbing tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- test/components/structures/MessagePanel-test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/components/structures/MessagePanel-test.js b/test/components/structures/MessagePanel-test.js index a96d0ed5d1..ad7d9c15c7 100644 --- a/test/components/structures/MessagePanel-test.js +++ b/test/components/structures/MessagePanel-test.js @@ -18,10 +18,12 @@ var React = require('react'); var ReactDOM = require("react-dom"); var TestUtils = require('react-addons-test-utils'); var expect = require('expect'); +import sinon from 'sinon'; var sdk = require('matrix-react-sdk'); var MessagePanel = sdk.getComponent('structures.MessagePanel'); +import UserSettingsStore from '../../../src/UserSettingsStore'; var test_utils = require('test-utils'); var mockclock = require('mock-clock'); @@ -54,9 +56,10 @@ describe('MessagePanel', function () { test_utils.beforeEach(this); client = test_utils.createTestClient(); client.credentials = {userId: '@me:here'}; + UserSettingsStore.getSyncedSettings = sinon.stub().returns({}); }); - afterEach(function () { + afterEach(function() { clock.uninstall(); });