diff --git a/test/test.js b/test/test.js index 1ef06f3..b01fb52 100644 --- a/test/test.js +++ b/test/test.js @@ -397,9 +397,18 @@ describe('E2E test - Switcher offline - Snapshot:', function () { requestGetStub.returns(Promise.resolve({ status: false })); // Snapshot outdated requestPostStub.returns(Promise.resolve(JSON.stringify(JSON.parse(dataJSON), null, 4))); // Mocking finishes + + switcher = new Switcher(url, apiKey, domain, component, environment, { + snapshotLocation: 'generated-snapshots/', + snapshotAutoload: true, + offline: true + }); await switcher.loadSnapshot(); assert.isTrue(await switcher.checkSnapshot()); + + switcher.unloadSnapshot(); + fs.unlinkSync(`generated-snapshots/${environment}.json`); }); it('should NOT update snapshot', async function () {