-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
49 lines (44 loc) · 1000 Bytes
/
test.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
45
46
47
48
49
/* global describe, it */
const assert = require('chai').assert
const proxycache = require('./')
describe('proxycache', () => {
it('should throw without options', done => {
assert.throws(proxycache)
done()
})
it('should throw with local store config', done => {
const config = {
cache: {
connection: {}
}
}
assert.throws(() => proxycache(config))
done()
})
it('should not initialize with unknown store client name', done => {
const config = {
store: {
client: 'unknown',
connection: {}
},
cache: {
client: 'gcloud',
connection: {}
}
}
proxycache(config).catch(() => done())
})
it('should not initialize with unknown cache client name', done => {
const config = {
store: {
client: 'redis',
connection: {}
},
cache: {
client: 'unknown',
connection: {}
}
}
proxycache(config).catch(() => done())
})
})