Stop creating sinon sandbox early
sinon might not be loaded at this point, which can cause tests to fail. We could create the sandbox in one of the hooks instead, but let's remove the sandbox completely to stay consistent with our other tests.
This commit is contained in:
parent
1230a4ce73
commit
bc31e4e8a2
|
@ -182,16 +182,15 @@ describe('WebUtil', function () {
|
||||||
window.chrome = chrome;
|
window.chrome = chrome;
|
||||||
});
|
});
|
||||||
|
|
||||||
const csSandbox = sinon.createSandbox();
|
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
settings = {};
|
settings = {};
|
||||||
csSandbox.spy(window.chrome.storage.sync, 'set');
|
sinon.spy(window.chrome.storage.sync, 'set');
|
||||||
csSandbox.spy(window.chrome.storage.sync, 'remove');
|
sinon.spy(window.chrome.storage.sync, 'remove');
|
||||||
return WebUtil.initSettings();
|
return WebUtil.initSettings();
|
||||||
});
|
});
|
||||||
afterEach(function () {
|
afterEach(function () {
|
||||||
csSandbox.restore();
|
window.chrome.storage.sync.set.restore();
|
||||||
|
window.chrome.storage.sync.remove.restore();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('writeSetting', function () {
|
describe('writeSetting', function () {
|
||||||
|
|
Loading…
Reference in New Issue