add test for cache ejection
This commit is contained in:
parent
8833c2276e
commit
49741e9608
@ -80,6 +80,22 @@ describe('Cache tests', function() {
|
|||||||
res = await fetch(TWO_HUNDRED_URL);
|
res = await fetch(TWO_HUNDRED_URL);
|
||||||
assert.strictEqual(res.fromCache, true);
|
assert.strictEqual(res.fromCache, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Can eject from cache', async function() {
|
||||||
|
res = await fetch(TWO_HUNDRED_URL);
|
||||||
|
assert.strictEqual(res.fromCache, false);
|
||||||
|
|
||||||
|
res = await fetch(TWO_HUNDRED_URL);
|
||||||
|
assert.strictEqual(res.fromCache, true);
|
||||||
|
|
||||||
|
await res.ejectFromCache();
|
||||||
|
|
||||||
|
res = await fetch(TWO_HUNDRED_URL);
|
||||||
|
assert.strictEqual(res.fromCache, false);
|
||||||
|
|
||||||
|
res = await fetch(TWO_HUNDRED_URL);
|
||||||
|
assert.strictEqual(res.fromCache, true);
|
||||||
|
});
|
||||||
}).timeout(10000);
|
}).timeout(10000);
|
||||||
|
|
||||||
describe('Data tests', function() {
|
describe('Data tests', function() {
|
||||||
|
Reference in New Issue
Block a user