You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-28 09:24:05 +03:00
Correctly restore MatrixClientPeg after each test case
This commit is contained in:
@@ -27,12 +27,19 @@ var test_utils = require('test-utils');
|
||||
var mockclock = require('mock-clock');
|
||||
|
||||
describe('MessagePanel', function () {
|
||||
var sandbox;
|
||||
var clock = mockclock.clock();
|
||||
var realSetTimeout = window.setTimeout;
|
||||
var events = mkEvents();
|
||||
|
||||
beforeEach(function() {
|
||||
test_utils.beforeEach(this);
|
||||
sandbox = test_utils.stubClient(sandbox);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
clock.uninstall();
|
||||
sandbox.restore();
|
||||
});
|
||||
|
||||
function mkEvents() {
|
||||
|
||||
Reference in New Issue
Block a user