Skip to content

Commit 1b95deb

Browse files
committed
test: updated snapshot load test
1 parent afd5068 commit 1b95deb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/switcher-snapshot.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ describe('E2E test - Switcher local - Snapshot:', function () {
173173
assert.equal(error.message, 'Something went wrong: Snapshot is not loaded. Use Client.loadSnapshot()');
174174
});
175175

176-
it('should update snapshot', async function () {
176+
it('should update snapshot when loading from remote', async function () {
177177
// given
178178
fetchStub = stub(FetchFacade, 'fetch');
179179

@@ -186,8 +186,9 @@ describe('E2E test - Switcher local - Snapshot:', function () {
186186
snapshotLocation: 'generated-snapshots/'
187187
});
188188

189-
await Client.loadSnapshot();
189+
const snapshotVersion = await Client.loadSnapshot();
190190
assert.isNotNull(Client.snapshot);
191+
assert.isAbove(snapshotVersion, 0);
191192

192193
// restore state to avoid process leakage
193194
Client.unloadSnapshot();

0 commit comments

Comments
 (0)