/
caching-strategies.js
44 lines (36 loc) 路 1.15 KB
/
caching-strategies.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
importScripts('/node_modules/mocha/mocha.js');
importScripts('/node_modules/chai/chai.js');
importScripts('/node_modules/sw-testing-helpers/build/browser/mocha-utils.js');
importScripts('/packages/sw-lib/build/sw-lib.min.js');
/* global goog */
const expect = self.chai.expect;
self.chai.should();
mocha.setup({
ui: 'bdd',
reporter: null,
});
describe('Test swlib.cacheOnly', function() {
it('should be accessible goog.swlib.cacheOnly', function() {
expect(goog.swlib.cacheOnly).to.exist;
});
});
describe('Test swlib.cacheFirst', function() {
it('should be accessible goog.swlib.cacheFirst', function() {
expect(goog.swlib.cacheFirst).to.exist;
});
});
describe('Test swlib.networkOnly', function() {
it('should be accessible goog.swlib.networkOnly', function() {
expect(goog.swlib.networkOnly).to.exist;
});
});
describe('Test swlib.networkFirst', function() {
it('should be accessible goog.swlib.networkFirst', function() {
expect(goog.swlib.networkFirst).to.exist;
});
});
describe('Test swlib.fastest', function() {
it('should be accessible goog.swlib.fastest', function() {
expect(goog.swlib.fastest).to.exist;
});
});