add test for cache ejection
This commit is contained in:
parent
c452c8d860
commit
371d20e933
@ -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