forked from jmdobry/angular-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkarma.start.js
More file actions
43 lines (41 loc) · 1.5 KB
/
karma.start.js
File metadata and controls
43 lines (41 loc) · 1.5 KB
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
var fail = function (msg) {
assert.equal('should not reach this!: ' + msg, 'failure');
},
TYPES_EXCEPT_STRING = [123, 123.123, null, undefined, {}, [], true, false, function () {
}],
TYPES_EXCEPT_STRING_OR_ARRAY = [123, 123.123, null, undefined, {}, true, false, function () {
}],
TYPES_EXCEPT_STRING_OR_NUMBER = [null, undefined, {}, [], true, false, function () {
}],
TYPES_EXCEPT_STRING_OR_ARRAY_OR_NUMBER = [null, undefined, {}, true, false, function () {
}],
TYPES_EXCEPT_NUMBER = ['string', null, undefined, {}, [], true, false, function () {
}],
TYPES_EXCEPT_OBJECT = ['string', 123, 123.123, null, undefined, true, false, function () {
}],
TYPES_EXCEPT_BOOLEAN = ['string', 123, 123.123, null, undefined, {}, [], function () {
}],
TYPES_EXCEPT_FUNCTION = ['string', 123, 123.123, null, undefined, {}, [], true, false],
CACHE_DEFAULTS = {
capacity: Number.MAX_VALUE,
maxAge: Number.MAX_VALUE,
deleteOnExpire: 'none',
onExpire: null,
cacheFlushInterval: null,
recycleFreq: 1000,
storageMode: 'memory',
storageImpl: null,
disabled: false,
storagePrefix: 'ac.'
};
var TestDSCacheFactoryProvider, TestDSCacheFactory, TestDSBinaryHeap;
beforeEach(module('angular-data.DSCacheFactory', function (_DSCacheFactoryProvider_) {
TestDSCacheFactoryProvider = _DSCacheFactoryProvider_;
}));
beforeEach(inject(function (_DSCacheFactory_, _DSBinaryHeap_) {
TestDSCacheFactory = _DSCacheFactory_;
TestDSBinaryHeap = _DSBinaryHeap_;
}));
afterEach(function () {
TestDSCacheFactory.destroyAll();
});