@fjell/cache 4.7.40 → 4.7.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/coverage_output.txt +995 -0
- package/dist/Operations.d.ts +99 -16
- package/dist/Operations.d.ts.map +1 -1
- package/dist/Options.d.ts +6 -0
- package/dist/Options.d.ts.map +1 -1
- package/dist/cache/TwoLayerDemo.d.ts +29 -0
- package/dist/cache/TwoLayerDemo.d.ts.map +1 -0
- package/dist/cache/TwoLayerFactory.d.ts +83 -0
- package/dist/cache/TwoLayerFactory.d.ts.map +1 -0
- package/dist/cache/layers/ItemCache.d.ts +41 -0
- package/dist/cache/layers/ItemCache.d.ts.map +1 -0
- package/dist/cache/layers/QueryCache.d.ts +52 -0
- package/dist/cache/layers/QueryCache.d.ts.map +1 -0
- package/dist/cache/layers/TwoLayerCacheMap.d.ts +115 -0
- package/dist/cache/layers/TwoLayerCacheMap.d.ts.map +1 -0
- package/dist/cache/patterns/StaleWhileRevalidateCache.d.ts +101 -0
- package/dist/cache/patterns/StaleWhileRevalidateCache.d.ts.map +1 -0
- package/dist/cache/types/TwoLayerTypes.d.ts +53 -0
- package/dist/cache/types/TwoLayerTypes.d.ts.map +1 -0
- package/dist/cache/warming/CacheWarmer.d.ts +147 -0
- package/dist/cache/warming/CacheWarmer.d.ts.map +1 -0
- package/dist/index.js +951 -425
- package/dist/ttl/TTLCalculator.d.ts +96 -0
- package/dist/ttl/TTLCalculator.d.ts.map +1 -0
- package/dist/ttl/TTLConfig.d.ts +79 -0
- package/dist/ttl/TTLConfig.d.ts.map +1 -0
- package/package.json +7 -7
- package/test_output.txt +965 -0
|
@@ -0,0 +1,995 @@
|
|
|
1
|
+
|
|
2
|
+
> @fjell/cache@4.7.41-dev.0 test
|
|
3
|
+
> vitest run --coverage
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
RUN v4.0.1 /Users/tobrien/gitw/getfjell/cache
|
|
7
|
+
Coverage enabled with v8
|
|
8
|
+
|
|
9
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Basic Properties > should have correct implementation type
|
|
10
|
+
(1763111382265) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
11
|
+
|
|
12
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Basic Properties > should report two-layer enabled
|
|
13
|
+
(1763111382266) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
14
|
+
|
|
15
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Basic Properties > should provide access to underlying cache
|
|
16
|
+
(1763111382266) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
17
|
+
|
|
18
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Item Operations > should pass through get operations
|
|
19
|
+
(1763111382267) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
20
|
+
|
|
21
|
+
stderr | tests/eviction/strategies/LFUEvictionStrategy.test.ts > LFUEvictionStrategy > Configuration Validation and Sanitization Tests > should handle invalid configuration values gracefully
|
|
22
|
+
decayFactor must be between 0 and 1, got -0.5. Correcting to 0.
|
|
23
|
+
sketchWidth must be positive, got -10. Correcting to 1024.
|
|
24
|
+
sketchDepth must be positive, got 0. Correcting to 4.
|
|
25
|
+
|
|
26
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Item Operations > should pass through set operations and invalidate queries
|
|
27
|
+
(1763111382268) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
28
|
+
|
|
29
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Item Operations > should pass through delete operations and invalidate queries
|
|
30
|
+
(1763111382269) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
31
|
+
|
|
32
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Item Operations > should pass through includes key operations
|
|
33
|
+
(1763111382269) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
34
|
+
|
|
35
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Item Operations > should pass through allIn operations
|
|
36
|
+
(1763111382269) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
37
|
+
|
|
38
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Item Operations > should pass through queryIn operations
|
|
39
|
+
(1763111382269) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
40
|
+
|
|
41
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Item Operations > should pass through contains operations
|
|
42
|
+
(1763111382269) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
43
|
+
|
|
44
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Item Operations > should handle clear operations and metadata
|
|
45
|
+
(1763111382269) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
46
|
+
|
|
47
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Query Operations > should set and get query results with metadata
|
|
48
|
+
(1763111382269) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
49
|
+
|
|
50
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Query Operations > should handle query result expiration based on TTL
|
|
51
|
+
(1763111382270) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
52
|
+
|
|
53
|
+
stderr | tests/memory/EnhancedMemoryCacheMap.test.ts > EnhancedMemoryCacheMap > Constructor with initial data > should handle invalid initial data keys gracefully
|
|
54
|
+
(1763111382275) [ERROR] - [@fjell/cache] [EnhancedMemoryCacheMap] Failed to parse initial data key [{"keyStr":"invalid-json-key","error":{}}]
|
|
55
|
+
|
|
56
|
+
stderr | tests/memory/MemoryCacheMap.test.ts > MemoryCacheMap > Constructor with Initial Data > should handle invalid JSON keys in initial data gracefully
|
|
57
|
+
(1763111382276) [ERROR] - [@fjell/cache] [MemoryCacheMap] Failed to parse initial data key [{"keyStr":"invalid-json","error":{}}]
|
|
58
|
+
|
|
59
|
+
stderr | tests/ops/set.test.ts > set operation > input validation > should throw error for undefined key
|
|
60
|
+
(1763111382278) [ERROR] - [@fjell/cache] [set] Key for Set is not a valid ItemKey:
|
|
61
|
+
|
|
62
|
+
stderr | tests/ops/set.test.ts > set operation > input validation > should throw error for empty object key
|
|
63
|
+
(1763111382278) [ERROR] - [@fjell/cache] [set] Key for Set is not a valid ItemKey: {}
|
|
64
|
+
|
|
65
|
+
stderr | tests/ops/set.test.ts > set operation > input validation > should throw error for malformed key
|
|
66
|
+
(1763111382279) [ERROR] - [@fjell/cache] [set] Key for Set is not a valid ItemKey: {"invalid":"key"}
|
|
67
|
+
|
|
68
|
+
stderr | tests/ops/set.test.ts > set operation > input validation > should throw error for incomplete primary key
|
|
69
|
+
(1763111382279) [ERROR] - [@fjell/cache] [set] Key for Set is not a valid ItemKey: {"kt":"test"}
|
|
70
|
+
|
|
71
|
+
stderr | tests/ops/set.test.ts > set operation > input validation > should throw error for incomplete composite key
|
|
72
|
+
(1763111382279) [ERROR] - [@fjell/cache] [set] Key does not match item key: {"kt":"test","pk":"1"} != {"kt":"test","pk":"3","loc":[{"kt":"container","lk":"container1"}]}
|
|
73
|
+
|
|
74
|
+
stderr | tests/ops/set.test.ts > set operation > key matching validation > should throw error when key does not match item key
|
|
75
|
+
(1763111382280) [ERROR] - [@fjell/cache] [set] Key does not match item key: {"kt":"test","pk":"different"} != {"kt":"test","pk":"1"}
|
|
76
|
+
|
|
77
|
+
stderr | tests/ops/set.test.ts > set operation > key matching validation > should throw error when primary key type differs
|
|
78
|
+
(1763111382280) [ERROR] - [@fjell/cache] [set] Key does not match item key: {"kt":"different","pk":"1"} != {"kt":"test","pk":"1"}
|
|
79
|
+
|
|
80
|
+
stderr | tests/ops/set.test.ts > set operation > key matching validation > should throw error when composite key location differs
|
|
81
|
+
(1763111382280) [ERROR] - [@fjell/cache] [set] Key does not match item key: {"kt":"test","pk":"3","loc":[{"kt":"container","lk":"different"}]} != {"kt":"test","pk":"3","loc":[{"kt":"container","lk":"container1"}]}
|
|
82
|
+
|
|
83
|
+
stderr | tests/ops/set.test.ts > set operation > edge cases and error scenarios > should handle null values in key normalization gracefully
|
|
84
|
+
(1763111382285) [ERROR] - [@fjell/cache] [set] Key for Set is not a valid ItemKey: {"kt":"test","pk":null}
|
|
85
|
+
|
|
86
|
+
stderr | tests/ops/set.test.ts > set operation > edge cases and error scenarios > should handle empty string keys as invalid
|
|
87
|
+
(1763111382286) [ERROR] - [@fjell/cache] [set] Key for Set is not a valid ItemKey: {"kt":"test","pk":""}
|
|
88
|
+
|
|
89
|
+
✓ tests/memory/EnhancedMemoryCacheMap.test.ts (108 tests | 12 skipped) 22ms
|
|
90
|
+
✓ tests/ops/set.test.ts (44 tests) 25ms
|
|
91
|
+
✓ tests/eviction/strategies/LFUEvictionStrategy.test.ts (50 tests) 65ms
|
|
92
|
+
✓ tests/examples/enhanced-eviction-examples.test.ts (23 tests) 138ms
|
|
93
|
+
✓ tests/eviction/EvictionStrategyFactory.test.ts (33 tests) 43ms
|
|
94
|
+
✓ tests/memory/MemoryCacheMap.test.ts (76 tests) 62ms
|
|
95
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Query Operations > should delete query results and metadata
|
|
96
|
+
(1763111382420) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
97
|
+
|
|
98
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Query Operations > should determine query completeness correctly
|
|
99
|
+
(1763111382420) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
100
|
+
|
|
101
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Query Operations > should handle query result with empty item keys
|
|
102
|
+
(1763111382421) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
103
|
+
|
|
104
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Query Invalidation > should invalidate queries containing modified items
|
|
105
|
+
(1763111382421) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
106
|
+
|
|
107
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Query Invalidation > should handle invalidation of non-existent queries gracefully
|
|
108
|
+
(1763111382421) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
109
|
+
|
|
110
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Query Invalidation > should invalidate multiple queries for single item change
|
|
111
|
+
(1763111382421) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
112
|
+
|
|
113
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Statistics and Cleanup > should provide two-layer statistics
|
|
114
|
+
(1763111382422) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
115
|
+
|
|
116
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Statistics and Cleanup > should clean up expired queries
|
|
117
|
+
(1763111382422) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
118
|
+
|
|
119
|
+
stderr | tests/ops/get.test.ts > get operation > input validation > should throw error for invalid key
|
|
120
|
+
(1763111382424) [ERROR] - [@fjell/core] [validation],[KeyValidator] Invalid key structure in get [{"key":{"invalid":"key"},"coordinate":{"kta":["test"],"scopes":[]}}]
|
|
121
|
+
|
|
122
|
+
stderr | tests/ops/get.test.ts > get operation > when bypassCache is enabled > should handle API errors properly
|
|
123
|
+
(1763111382428) [ERROR] - [@fjell/cache] [get] API request failed [{"key":{"kt":"test","pk":"1"},"error":{}}]
|
|
124
|
+
|
|
125
|
+
stderr | tests/ops/get.test.ts > get operation > error handling > should propagate API errors
|
|
126
|
+
(1763111382433) [ERROR] - [@fjell/cache] [get] Error getting item for key [{"key":{"kt":"test","pk":"1"},"message":"API failure","stack":"Error: API failure
|
|
127
|
+
at /Users/tobrien/gitw/getfjell/cache/tests/ops/get.test.ts:306:24
|
|
128
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:157:11
|
|
129
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:753:26
|
|
130
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
131
|
+
at new Promise (<anonymous>)
|
|
132
|
+
at runWithTimeout (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1602:10)
|
|
133
|
+
at runTest (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1309:12)
|
|
134
|
+
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
135
|
+
at runSuite (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
136
|
+
at runSuite (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
137
|
+
at runSuite (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
138
|
+
at runFiles (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1526:3)
|
|
139
|
+
at startTests (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1559:3)
|
|
140
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:76:64
|
|
141
|
+
at withEnv (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:57:3)
|
|
142
|
+
at run (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:72:144)
|
|
143
|
+
at runBaseTests (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:122:2)
|
|
144
|
+
at executeTests (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/init-forks.WglB-sfY.js:24:4)
|
|
145
|
+
at execute (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/init.94FWN9pW.js:99:3)
|
|
146
|
+
at process.onMessage (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/init.94FWN9pW.js:164:20)"}]
|
|
147
|
+
|
|
148
|
+
stderr | tests/ops/get.test.ts > get operation > error handling > should propagate API errors even with TTL configured
|
|
149
|
+
(1763111382434) [ERROR] - [@fjell/cache] [get] Error getting item for key [{"key":{"kt":"test","pk":"1"},"message":"Network error","stack":"Error: Network error
|
|
150
|
+
at /Users/tobrien/gitw/getfjell/cache/tests/ops/get.test.ts:317:24
|
|
151
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:157:11
|
|
152
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:753:26
|
|
153
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
154
|
+
at new Promise (<anonymous>)
|
|
155
|
+
at runWithTimeout (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1602:10)
|
|
156
|
+
at runTest (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1309:12)
|
|
157
|
+
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
158
|
+
at runSuite (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
159
|
+
at runSuite (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
160
|
+
at runSuite (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
161
|
+
at runFiles (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1526:3)
|
|
162
|
+
at startTests (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1559:3)
|
|
163
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:76:64
|
|
164
|
+
at withEnv (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:57:3)
|
|
165
|
+
at run (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:72:144)
|
|
166
|
+
at runBaseTests (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:122:2)
|
|
167
|
+
at executeTests (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/init-forks.WglB-sfY.js:24:4)
|
|
168
|
+
at execute (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/init.94FWN9pW.js:99:3)
|
|
169
|
+
at process.onMessage (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/init.94FWN9pW.js:164:20)"}]
|
|
170
|
+
|
|
171
|
+
stderr | tests/ops/get.test.ts > get operation > error handling > should handle API errors with stack trace
|
|
172
|
+
(1763111382434) [ERROR] - [@fjell/cache] [get] Error getting item for key [{"key":{"kt":"test","pk":"1"},"message":"Detailed API error","stack":"Error stack trace"}]
|
|
173
|
+
|
|
174
|
+
✓ tests/ops/retrieve.test.ts (37 tests) 17ms
|
|
175
|
+
stderr | tests/utils/EvictionStrategies.edge-cases.test.ts > Eviction Strategies Edge Cases and Comprehensive Tests > createEvictionStrategy factory edge cases > should handle extreme configuration values for enhanced strategies
|
|
176
|
+
sketchWidth should be at least 16 for optimal performance, got 1. Correcting to 16.
|
|
177
|
+
adaptiveLearningRate must be between 0 and 10, got 100. Correcting to 10.
|
|
178
|
+
|
|
179
|
+
stderr | tests/utils/EvictionStrategies.edge-cases.test.ts > Eviction Strategies Edge Cases and Comprehensive Tests > createEvictionStrategy factory edge cases > should handle invalid configuration values gracefully
|
|
180
|
+
decayFactor must be between 0 and 1, got -0.5. Correcting to 0.
|
|
181
|
+
sketchWidth must be positive, got 0. Correcting to 1024.
|
|
182
|
+
sketchDepth must be positive, got -1. Correcting to 4.
|
|
183
|
+
decayFactor must be between 0 and 1, got -0.5. Correcting to 0.
|
|
184
|
+
sketchWidth must be positive, got 0. Correcting to 1024.
|
|
185
|
+
sketchDepth must be positive, got -1. Correcting to 4.
|
|
186
|
+
|
|
187
|
+
✓ tests/ops/get.test.ts (34 tests) 16ms
|
|
188
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
189
|
+
|
|
190
|
+
🚀 Fjell-Cache Basic Example
|
|
191
|
+
============================
|
|
192
|
+
|
|
193
|
+
This example demonstrates basic cache operations with User and Task models.
|
|
194
|
+
|
|
195
|
+
Step 1: Setting up cache infrastructure
|
|
196
|
+
--------------------------------------
|
|
197
|
+
✅ Created cache registry
|
|
198
|
+
✅ Created mock APIs for users and tasks
|
|
199
|
+
|
|
200
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
201
|
+
✅ Created cache instances (which are now also instances)
|
|
202
|
+
✅ Created cache model instances
|
|
203
|
+
|
|
204
|
+
Step 2: Creating test data
|
|
205
|
+
-------------------------
|
|
206
|
+
✅ Created user: Alice Johnson (alice@example.com)
|
|
207
|
+
✅ Created user: Bob Smith (bob@example.com)
|
|
208
|
+
✅ Created task: Setup project repository
|
|
209
|
+
✅ Created task: Implement user authentication
|
|
210
|
+
✅ Created test users and tasks
|
|
211
|
+
|
|
212
|
+
Step 3: Cache operations - Fetching all items
|
|
213
|
+
----------------------------------------------
|
|
214
|
+
|
|
215
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
216
|
+
📦 Fetching all users from storage...
|
|
217
|
+
|
|
218
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
219
|
+
📋 Cached 2 users: [ 'Alice Johnson', 'Bob Smith' ]
|
|
220
|
+
|
|
221
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
222
|
+
📦 Fetching all tasks from storage...
|
|
223
|
+
|
|
224
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
225
|
+
📋 Cached 2 tasks: [ 'Setup project repository', 'Implement user authentication' ]
|
|
226
|
+
|
|
227
|
+
Step 4: Individual item retrieval
|
|
228
|
+
---------------------------------
|
|
229
|
+
|
|
230
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
231
|
+
👤 Retrieved from cache: Alice Johnson (alice@example.com)
|
|
232
|
+
|
|
233
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
234
|
+
📝 Retrieved from cache: Setup project repository - Status: completed
|
|
235
|
+
|
|
236
|
+
Step 5: Cache behavior demonstration
|
|
237
|
+
-----------------------------------
|
|
238
|
+
🎯 Second retrieval (should hit cache):
|
|
239
|
+
|
|
240
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
241
|
+
👤 Retrieved: Alice Johnson (cache hit)
|
|
242
|
+
✅ Created user: Charlie Brown (charlie@example.com)
|
|
243
|
+
🎯 New item retrieval (cache miss, will fetch from API):
|
|
244
|
+
|
|
245
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
246
|
+
🔍 Getting user with key: user-3
|
|
247
|
+
|
|
248
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
249
|
+
👤 Retrieved: Charlie Brown (fetched from API and cached)
|
|
250
|
+
|
|
251
|
+
Step 6: Cache updates
|
|
252
|
+
--------------------
|
|
253
|
+
|
|
254
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
255
|
+
🔄 Updated task in cache: Implement user authentication - New status: completed
|
|
256
|
+
|
|
257
|
+
Step 7: Query operations
|
|
258
|
+
-----------------------
|
|
259
|
+
|
|
260
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
261
|
+
📦 Fetching all tasks from storage...
|
|
262
|
+
|
|
263
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
264
|
+
🔍 Found 2 tasks through cache query
|
|
265
|
+
|
|
266
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
267
|
+
📝 Retrieved one task: Setup project repository
|
|
268
|
+
|
|
269
|
+
Step 8: Cache management
|
|
270
|
+
-----------------------
|
|
271
|
+
📊 Cache Statistics:
|
|
272
|
+
👥 Users in cache: 2
|
|
273
|
+
📝 Tasks in cache: 2
|
|
274
|
+
🎯 User cache coordinate: user
|
|
275
|
+
🎯 Task cache coordinate: task
|
|
276
|
+
|
|
277
|
+
Step 9: Cleanup demonstration
|
|
278
|
+
-----------------------------
|
|
279
|
+
🗑️ Removed user from storage
|
|
280
|
+
|
|
281
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
282
|
+
🎯 Cache still contains removed user: Charlie Brown
|
|
283
|
+
|
|
284
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test branch patterns that mirror the example structure for increased coverage
|
|
285
|
+
📋 Fresh fetch shows 2 users (cache updated)
|
|
286
|
+
|
|
287
|
+
🎉 Basic Cache Example Complete!
|
|
288
|
+
================================
|
|
289
|
+
|
|
290
|
+
Key concepts demonstrated:
|
|
291
|
+
• Cache creation with registry and instances
|
|
292
|
+
• Basic cache operations (get, set, all, find, one)
|
|
293
|
+
• Cache hits vs misses
|
|
294
|
+
• Cache updates and management
|
|
295
|
+
• Integration with mock storage APIs
|
|
296
|
+
• Cache lifecycle and data consistency
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
✓ tests/utils/EvictionStrategies.edge-cases.test.ts (32 tests) 14ms
|
|
300
|
+
stderr | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should verify cache operations with empty data scenarios
|
|
301
|
+
(1763111382457) [ERROR] - [@fjell/cache] [get] Error getting item for key [{"key":{"kt":"test","pk":"missing"},"message":"Not found: missing","stack":"Error: Not found: missing
|
|
302
|
+
at Object.get (/Users/tobrien/gitw/getfjell/cache/tests/examples/basic-cache-example.integration.test.ts:98:37)
|
|
303
|
+
at executeGetLogic (/Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:166:24)
|
|
304
|
+
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
305
|
+
at /Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:70:14
|
|
306
|
+
at /Users/tobrien/gitw/getfjell/cache/node_modules/@fjell/core/dist/index.js:1872:22
|
|
307
|
+
at get (/Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:74:18)"}]
|
|
308
|
+
|
|
309
|
+
stdout | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should test cache memory behavior and performance characteristics
|
|
310
|
+
First call: 1.01ms, Cache hit: 0.28ms
|
|
311
|
+
|
|
312
|
+
stdout | tests/examples/cache-type-configurations-example.integration.test.ts > Cache Type Configurations Example Integration > should import and execute cache type configurations example without errors
|
|
313
|
+
🚀 Cache Type Configuration Examples
|
|
314
|
+
|
|
315
|
+
1️⃣ Memory Cache Configuration
|
|
316
|
+
Best for: Fast access, temporary data, development
|
|
317
|
+
✅ Memory cache configured with:
|
|
318
|
+
- Max items: 1000
|
|
319
|
+
- TTL: undefinedms (0s)
|
|
320
|
+
- Debug logging: true
|
|
321
|
+
- Auto sync: true
|
|
322
|
+
- Max retries: 3
|
|
323
|
+
|
|
324
|
+
2️⃣ IndexedDB Cache Configuration
|
|
325
|
+
Best for: Large datasets, offline capability, persistent storage
|
|
326
|
+
✅ IndexedDB cache configured with:
|
|
327
|
+
- Database: UserAppCache
|
|
328
|
+
- Version: 2
|
|
329
|
+
- Store: users
|
|
330
|
+
- Debug logging: false
|
|
331
|
+
- Max retries: 5
|
|
332
|
+
- Retry delay: 2000ms
|
|
333
|
+
|
|
334
|
+
3️⃣ localStorage Cache Configuration
|
|
335
|
+
Best for: User preferences, settings, moderate-sized persistent data
|
|
336
|
+
✅ localStorage cache configured with:
|
|
337
|
+
- Key prefix: "myapp:users:"
|
|
338
|
+
- Compression: true
|
|
339
|
+
- Auto sync: false
|
|
340
|
+
- Max retries: 2
|
|
341
|
+
- Default expiration: 7200000ms (7200s)
|
|
342
|
+
|
|
343
|
+
4️⃣ Environment-Based Configuration
|
|
344
|
+
Automatically select optimal cache based on environment
|
|
345
|
+
🌐 Browser with IndexedDB detected - using IndexedDB
|
|
346
|
+
✅ Optimal configuration selected
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
✓ tests/examples/cache-map-example.integration.test.ts (1 test) 16ms
|
|
350
|
+
stdout | tests/examples/cache-type-configurations-example.integration.test.ts > Cache Type Configurations Example Integration > should import and execute cache type configurations example without errors
|
|
351
|
+
🌐 Browser with IndexedDB detected - using IndexedDB
|
|
352
|
+
|
|
353
|
+
✓ tests/examples/cache-type-configurations-example.integration.test.ts (1 test) 305ms
|
|
354
|
+
stderr | tests/integration/CacheIntegration.test.ts > Cache Integration Tests > Error Handling and Edge Cases > should handle storage errors gracefully in browser implementations
|
|
355
|
+
(1763111382504) [ERROR] - [@fjell/cache] [LocalStorageCacheMap] Error storing to localStorage (attempt 1/3) [{"key":{"kt":"test","pk":"1"},"value":{"key":{"kt":"test","pk":"1"},"id":"1","name":"Test Item","value":100},"error":{},"isLastAttempt":false}]
|
|
356
|
+
(1763111382504) [ERROR] - [@fjell/cache] [LocalStorageCacheMap] Error storing to localStorage (attempt 2/3) [{"key":{"kt":"test","pk":"1"},"value":{"key":{"kt":"test","pk":"1"},"id":"1","name":"Test Item","value":100},"error":{},"isLastAttempt":false}]
|
|
357
|
+
(1763111382504) [ERROR] - [@fjell/cache] [LocalStorageCacheMap] Error storing to localStorage (attempt 3/3) [{"key":{"kt":"test","pk":"1"},"value":{"key":{"kt":"test","pk":"1"},"id":"1","name":"Test Item","value":100},"error":{},"isLastAttempt":true}]
|
|
358
|
+
|
|
359
|
+
✓ tests/examples/memory-leak-prevention.integration.test.ts (34 tests) 15ms
|
|
360
|
+
✓ tests/integration/CacheIntegration.test.ts (15 tests) 17ms
|
|
361
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Statistics and Cleanup > should handle statistics with mixed expired and valid queries
|
|
362
|
+
(1763111382523) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
363
|
+
|
|
364
|
+
stdout | tests/cache/layers/QueryCache.test.ts > QueryCache > Debug Logging > should log operations when debug is enabled
|
|
365
|
+
[QueryCache] Stored query result: debug-query
|
|
366
|
+
- Items: 1
|
|
367
|
+
- Complete: true
|
|
368
|
+
- TTL: 300s
|
|
369
|
+
- Expires: 2025-11-14T09:14:42.563Z
|
|
370
|
+
|
|
371
|
+
stdout | tests/cache/layers/QueryCache.test.ts > QueryCache > Debug Logging > should log operations when debug is enabled
|
|
372
|
+
[QueryCache] Cache hit for query: debug-query (1 items, complete: true)
|
|
373
|
+
|
|
374
|
+
stdout | tests/cache/layers/QueryCache.test.ts > QueryCache > Debug Logging > should log operations when debug is enabled
|
|
375
|
+
[QueryCache] Invalidated 1 queries matching pattern: debug.*
|
|
376
|
+
|
|
377
|
+
stdout | tests/cache/layers/QueryCache.test.ts > QueryCache > Debug Logging > should log operations when debug is enabled
|
|
378
|
+
[QueryCache] Cache miss for query: debug-query
|
|
379
|
+
|
|
380
|
+
stdout | tests/cache/layers/QueryCache.test.ts > QueryCache > Debug Logging > should log operations when debug is enabled
|
|
381
|
+
[QueryCache] Cleared 0 query results
|
|
382
|
+
|
|
383
|
+
✓ tests/CacheMap.test.ts (40 tests) 13ms
|
|
384
|
+
stderr | tests/ops/action.test.ts > action operation > input validation > should throw error for invalid item key
|
|
385
|
+
(1763111382568) [ERROR] - [@fjell/core] [validation],[KeyValidator] Invalid key structure in action [{"key":{"invalid":"key"},"coordinate":{"kta":["test"],"scopes":["container"]}}]
|
|
386
|
+
|
|
387
|
+
stderr | tests/ops/action.test.ts > action operation > input validation > should validate key before any cache operations
|
|
388
|
+
(1763111382570) [ERROR] - [@fjell/core] [validation],[KeyValidator] Invalid key structure in action [{"key":{"kt":"test"},"coordinate":{"kta":["test"],"scopes":["container"]}}]
|
|
389
|
+
|
|
390
|
+
stderr | tests/ops/action.test.ts > action operation > eviction key parsing error handling > should handle malformed evicted keys gracefully
|
|
391
|
+
(1763111382573) [ERROR] - [@fjell/cache] [action] Failed to parse evicted key during deletion [{"evictedKey":"invalid-json","error":"Unexpected token 'i', "invalid-json" is not valid JSON"}]
|
|
392
|
+
|
|
393
|
+
stderr | tests/ops/action.test.ts > action operation > eviction key parsing error handling > should handle malformed evicted keys gracefully
|
|
394
|
+
(1763111382573) [ERROR] - [@fjell/cache] [action] Failed to parse evicted key during deletion [{"evictedKey":"{incomplete json","error":"Expected property name or '}' in JSON at position 1 (line 1 column 2)"}]
|
|
395
|
+
|
|
396
|
+
stderr | tests/ops/action.test.ts > action operation > eviction key parsing error handling > should continue processing when JSON parse fails on evicted keys
|
|
397
|
+
(1763111382573) [ERROR] - [@fjell/cache] [action] Failed to parse evicted key during deletion [{"evictedKey":"undefined","error":""undefined" is not valid JSON"}]
|
|
398
|
+
(1763111382573) [ERROR] - [@fjell/cache] [action] Failed to parse evicted key during deletion [{"evictedKey":"{circular_ref}","error":"Expected property name or '}' in JSON at position 1 (line 1 column 2)"}]
|
|
399
|
+
|
|
400
|
+
stderr | tests/ops/action.test.ts > action operation > eviction key parsing error handling > should continue processing when JSON parse fails on evicted keys
|
|
401
|
+
(1763111382573) [ERROR] - [@fjell/cache] [action] Failed to parse evicted key during deletion [{"evictedKey":"invalid","error":"Unexpected token 'i', "invalid" is not valid JSON"}]
|
|
402
|
+
|
|
403
|
+
stderr | tests/events/CacheEventEmitter.test.ts > CacheEventEmitter > event emission > should handle listener errors gracefully
|
|
404
|
+
Error in cache event listener: Error: Test error
|
|
405
|
+
at /Users/tobrien/gitw/getfjell/cache/tests/events/CacheEventEmitter.test.ts:125:15
|
|
406
|
+
at Mock (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/spy/dist/index.js:266:34)
|
|
407
|
+
at CacheEventEmitter.emitToSubscription (/Users/tobrien/gitw/getfjell/cache/src/events/CacheEventEmitter.ts:328:9)
|
|
408
|
+
at CacheEventEmitter.emit (/Users/tobrien/gitw/getfjell/cache/src/events/CacheEventEmitter.ts:182:14)
|
|
409
|
+
at /Users/tobrien/gitw/getfjell/cache/tests/events/CacheEventEmitter.test.ts:136:28
|
|
410
|
+
at Proxy.assertThrows (file:///Users/tobrien/gitw/getfjell/cache/node_modules/chai/index.js:2800:5)
|
|
411
|
+
at Proxy.methodWrapper (file:///Users/tobrien/gitw/getfjell/cache/node_modules/chai/index.js:1701:25)
|
|
412
|
+
at Proxy.<anonymous> (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/expect/dist/index.js:1145:12)
|
|
413
|
+
at Proxy.overwritingMethodWrapper (file:///Users/tobrien/gitw/getfjell/cache/node_modules/chai/index.js:1751:33)
|
|
414
|
+
at Proxy.<anonymous> (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/expect/dist/index.js:1481:16)
|
|
415
|
+
at Proxy.<anonymous> (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/expect/dist/index.js:1086:14)
|
|
416
|
+
at Proxy.methodWrapper (file:///Users/tobrien/gitw/getfjell/cache/node_modules/chai/index.js:1701:25)
|
|
417
|
+
at /Users/tobrien/gitw/getfjell/cache/tests/events/CacheEventEmitter.test.ts:136:45
|
|
418
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:157:11
|
|
419
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:753:26
|
|
420
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1636:20
|
|
421
|
+
at new Promise (<anonymous>)
|
|
422
|
+
at runWithTimeout (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1602:10)
|
|
423
|
+
at runTest (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1309:12)
|
|
424
|
+
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
425
|
+
at runSuite (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
426
|
+
at runSuite (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
427
|
+
at runSuite (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1468:8)
|
|
428
|
+
at runFiles (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1526:3)
|
|
429
|
+
at startTests (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:1559:3)
|
|
430
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:76:64
|
|
431
|
+
at withEnv (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:57:3)
|
|
432
|
+
at run (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:72:144)
|
|
433
|
+
at runBaseTests (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/base.BYPMk0VN.js:122:2)
|
|
434
|
+
at executeTests (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/init-forks.WglB-sfY.js:24:4)
|
|
435
|
+
at execute (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/init.94FWN9pW.js:99:3)
|
|
436
|
+
at process.onMessage (file:///Users/tobrien/gitw/getfjell/cache/node_modules/vitest/dist/chunks/init.94FWN9pW.js:164:20)
|
|
437
|
+
|
|
438
|
+
✓ tests/ops/action.test.ts (24 tests) 13ms
|
|
439
|
+
✓ tests/events/CacheEventEmitter.test.ts (41 tests) 14ms
|
|
440
|
+
stderr | tests/events/CacheEventIntegration.test.ts > Cache Event Integration > error handling > should continue emitting events even if a listener throws
|
|
441
|
+
Error in cache event listener: Error: Test listener error
|
|
442
|
+
at /Users/tobrien/gitw/getfjell/cache/tests/events/CacheEventIntegration.test.ts:403:15
|
|
443
|
+
at Mock (file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/spy/dist/index.js:266:34)
|
|
444
|
+
at CacheEventEmitter.emitToSubscription (/Users/tobrien/gitw/getfjell/cache/src/events/CacheEventEmitter.ts:328:9)
|
|
445
|
+
at CacheEventEmitter.emit (/Users/tobrien/gitw/getfjell/cache/src/events/CacheEventEmitter.ts:182:14)
|
|
446
|
+
at set (/Users/tobrien/gitw/getfjell/cache/src/ops/set.ts:150:16)
|
|
447
|
+
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
448
|
+
at /Users/tobrien/gitw/getfjell/cache/tests/events/CacheEventIntegration.test.ts:413:7
|
|
449
|
+
at file:///Users/tobrien/gitw/getfjell/cache/node_modules/@vitest/runner/dist/index.js:753:20
|
|
450
|
+
|
|
451
|
+
✓ tests/events/CacheEventIntegration.test.ts (15 tests) 14ms
|
|
452
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Metadata Provider Methods > should delegate metadata operations to underlying cache
|
|
453
|
+
(1763111382624) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
454
|
+
|
|
455
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Metadata Provider Methods > should handle metadata operations when underlying cache doesn't support them
|
|
456
|
+
(1763111382624) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
457
|
+
|
|
458
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Metadata Provider Methods > should get current size from underlying cache
|
|
459
|
+
(1763111382624) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
460
|
+
|
|
461
|
+
stderr | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should handle various API response scenarios and edge cases
|
|
462
|
+
(1763111382624) [ERROR] - [@fjell/cache] [get] Error getting item for key [{"key":{"kt":"edge","pk":"null-error"},"message":"Null error test","stack":"Error: Null error test
|
|
463
|
+
at Object.get (/Users/tobrien/gitw/getfjell/cache/tests/examples/basic-cache-example.integration.test.ts:373:35)
|
|
464
|
+
at executeGetLogic (/Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:166:24)
|
|
465
|
+
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
466
|
+
at /Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:70:14
|
|
467
|
+
at /Users/tobrien/gitw/getfjell/cache/node_modules/@fjell/core/dist/index.js:1872:22
|
|
468
|
+
at get (/Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:74:18)"}]
|
|
469
|
+
|
|
470
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Metadata Provider Methods > should get size limits from underlying cache
|
|
471
|
+
(1763111382624) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
472
|
+
|
|
473
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Cache Map Interface Compliance > should pass through keys() operation
|
|
474
|
+
(1763111382624) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
475
|
+
|
|
476
|
+
stderr | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should handle various API response scenarios and edge cases
|
|
477
|
+
(1763111382624) [ERROR] - [@fjell/cache] [get] Error getting item for key [{"key":{"kt":"edge","pk":"undefined-error"},"message":"Undefined error test","stack":"Error: Undefined error test
|
|
478
|
+
at Object.get (/Users/tobrien/gitw/getfjell/cache/tests/examples/basic-cache-example.integration.test.ts:376:35)
|
|
479
|
+
at executeGetLogic (/Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:166:24)
|
|
480
|
+
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
481
|
+
at /Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:70:14
|
|
482
|
+
at /Users/tobrien/gitw/getfjell/cache/node_modules/@fjell/core/dist/index.js:1872:22
|
|
483
|
+
at get (/Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:74:18)"}]
|
|
484
|
+
|
|
485
|
+
stderr | tests/examples/basic-cache-example.integration.test.ts > Basic Cache Example Integration Tests > Basic Cache Operations Example > should handle various API response scenarios and edge cases
|
|
486
|
+
(1763111382625) [ERROR] - [@fjell/cache] [get] Error getting item for key [{"key":{"kt":"edge","pk":"missing"},"message":"Edge case item not found: missing","stack":"Error: Edge case item not found: missing
|
|
487
|
+
at Object.get (/Users/tobrien/gitw/getfjell/cache/tests/examples/basic-cache-example.integration.test.ts:378:33)
|
|
488
|
+
at executeGetLogic (/Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:166:24)
|
|
489
|
+
at processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
490
|
+
at /Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:70:14
|
|
491
|
+
at /Users/tobrien/gitw/getfjell/cache/node_modules/@fjell/core/dist/index.js:1872:22
|
|
492
|
+
at get (/Users/tobrien/gitw/getfjell/cache/src/ops/get.ts:74:18)"}]
|
|
493
|
+
|
|
494
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Cache Map Interface Compliance > should pass through values() operation
|
|
495
|
+
(1763111382625) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
496
|
+
|
|
497
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Cache Map Interface Compliance > should create a clone of the cache
|
|
498
|
+
(1763111382626) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
499
|
+
|
|
500
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Cache Map Interface Compliance > should create a clone of the cache
|
|
501
|
+
(1763111382626) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
502
|
+
|
|
503
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Query Metadata Extraction > should extract query type from hash correctly
|
|
504
|
+
(1763111382626) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
505
|
+
|
|
506
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Query Metadata Extraction > should extract filter information from query hash
|
|
507
|
+
(1763111382626) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
508
|
+
|
|
509
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Query Metadata Extraction > should handle malformed query hashes gracefully
|
|
510
|
+
(1763111382626) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
511
|
+
|
|
512
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > CacheMap Abstract Methods > should implement invalidateItemKeys
|
|
513
|
+
(1763111382626) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
514
|
+
|
|
515
|
+
stderr | tests/ops/one.test.ts > one operation > when bypassCache is enabled > should handle API errors properly
|
|
516
|
+
(1763111382626) [ERROR] - [@fjell/cache] [one] API request failed [{"query":{"compoundCondition":{"compoundType":"AND","conditions":[{"column":"id","value":"1","operator":"=="}]}},"locations":[],"error":{}}]
|
|
517
|
+
|
|
518
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > CacheMap Abstract Methods > should implement invalidateLocation
|
|
519
|
+
(1763111382626) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
520
|
+
|
|
521
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > CacheMap Abstract Methods > should implement clearQueryResults
|
|
522
|
+
(1763111382627) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
523
|
+
|
|
524
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Error Handling > should handle underlying cache errors gracefully
|
|
525
|
+
(1763111382627) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
526
|
+
|
|
527
|
+
✓ tests/eviction/EvictionStrategyValidation.test.ts (82 tests) 13ms
|
|
528
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Error Handling > should handle query operations when queries don't exist
|
|
529
|
+
(1763111382627) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
530
|
+
|
|
531
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Options and Configuration > should use default options when not provided
|
|
532
|
+
(1763111382628) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
533
|
+
|
|
534
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Options and Configuration > should respect debug option in logging
|
|
535
|
+
(1763111382628) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
536
|
+
|
|
537
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Options and Configuration > should respect debug option in logging
|
|
538
|
+
(1763111382628) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
539
|
+
|
|
540
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Options and Configuration > should handle different TTL configurations
|
|
541
|
+
(1763111382628) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
542
|
+
|
|
543
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Complex Scenarios > should handle rapid query invalidation and recreation
|
|
544
|
+
(1763111382628) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
545
|
+
|
|
546
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Complex Scenarios > should handle large numbers of queries efficiently
|
|
547
|
+
(1763111382629) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
548
|
+
|
|
549
|
+
stdout | tests/cache/layers/TwoLayerCacheMap.test.ts > TwoLayerCacheMap > Complex Scenarios > should handle query results with complex item key structures
|
|
550
|
+
(1763111382629) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
551
|
+
|
|
552
|
+
✓ tests/examples/basic-cache-example.integration.test.ts (8 tests) 188ms
|
|
553
|
+
✓ tests/cache/layers/TwoLayerCacheMap.test.ts (43 tests) 367ms
|
|
554
|
+
✓ tests/InstanceFactory.test.ts (63 tests) 14ms
|
|
555
|
+
✓ tests/ops/one.test.ts (20 tests) 13ms
|
|
556
|
+
stderr | tests/ops/update.test.ts > update operation > validation and error handling > should throw error for invalid key
|
|
557
|
+
(1763111382676) [ERROR] - [@fjell/core] [validation],[KeyValidator] Invalid key structure in update [{"key":{"kt":"test"},"coordinate":{"kta":["test"],"scopes":[]}}]
|
|
558
|
+
|
|
559
|
+
stderr | tests/ops/update.test.ts > update operation > validation and error handling > should throw error for malformed key
|
|
560
|
+
(1763111382678) [ERROR] - [@fjell/core] [validation],[KeyValidator] Invalid key structure in update [{"key":{"kt":"test"},"coordinate":{"kta":["test"],"scopes":[]}}]
|
|
561
|
+
|
|
562
|
+
stderr | tests/ops/update.test.ts > update operation > validation and error handling > should propagate API errors
|
|
563
|
+
(1763111382678) [ERROR] - [@fjell/cache] [update] Error updating item [{"error":{}}]
|
|
564
|
+
|
|
565
|
+
stderr | tests/ops/update.test.ts > update operation > validation and error handling > should handle network timeouts
|
|
566
|
+
(1763111382679) [ERROR] - [@fjell/cache] [update] Error updating item [{"error":{}}]
|
|
567
|
+
|
|
568
|
+
✓ tests/ops/update.test.ts (16 tests) 12ms
|
|
569
|
+
✓ tests/patterns/StaleWhileRevalidate.test.ts (13 tests) 462ms
|
|
570
|
+
stderr | tests/ops/find-operations.test.ts > Find Operations > find operation with bypassCache enabled > should handle API errors properly
|
|
571
|
+
(1763111382697) [ERROR] - [@fjell/cache] [find] API request failed [{"finder":"by-value","params":{"value":100},"locations":[],"error":{}}]
|
|
572
|
+
|
|
573
|
+
stderr | tests/ops/find-operations.test.ts > Find Operations > findOne operation with bypassCache enabled > should handle API errors properly
|
|
574
|
+
(1763111382700) [ERROR] - [@fjell/cache] [findOne] API request failed [{"finder":"by-id","finderParams":{"id":"1"},"locations":[],"error":{}}]
|
|
575
|
+
|
|
576
|
+
✓ tests/ops/find-operations.test.ts (27 tests) 12ms
|
|
577
|
+
stdout | tests/examples/cache-type-configurations-example.test.ts
|
|
578
|
+
🚀 Cache Type Configuration Examples
|
|
579
|
+
|
|
580
|
+
1️⃣ Memory Cache Configuration
|
|
581
|
+
Best for: Fast access, temporary data, development
|
|
582
|
+
✅ Memory cache configured with:
|
|
583
|
+
- Max items: 1000
|
|
584
|
+
- TTL: undefinedms (0s)
|
|
585
|
+
- Debug logging: true
|
|
586
|
+
- Auto sync: true
|
|
587
|
+
- Max retries: 3
|
|
588
|
+
|
|
589
|
+
2️⃣ IndexedDB Cache Configuration
|
|
590
|
+
Best for: Large datasets, offline capability, persistent storage
|
|
591
|
+
✅ IndexedDB cache configured with:
|
|
592
|
+
- Database: UserAppCache
|
|
593
|
+
- Version: 2
|
|
594
|
+
- Store: users
|
|
595
|
+
- Debug logging: false
|
|
596
|
+
- Max retries: 5
|
|
597
|
+
- Retry delay: 2000ms
|
|
598
|
+
|
|
599
|
+
3️⃣ localStorage Cache Configuration
|
|
600
|
+
Best for: User preferences, settings, moderate-sized persistent data
|
|
601
|
+
✅ localStorage cache configured with:
|
|
602
|
+
- Key prefix: "myapp:users:"
|
|
603
|
+
- Compression: true
|
|
604
|
+
- Auto sync: false
|
|
605
|
+
- Max retries: 2
|
|
606
|
+
- Default expiration: 7200000ms (7200s)
|
|
607
|
+
|
|
608
|
+
4️⃣ Environment-Based Configuration
|
|
609
|
+
Automatically select optimal cache based on environment
|
|
610
|
+
🖥️ Node.js or limited browser environment - using memory cache
|
|
611
|
+
✅ Optimal configuration selected
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
stderr | tests/primary/Cache.test.ts > PItemCache > should throw error when setting item with mismatched keys
|
|
615
|
+
(1763111382740) [ERROR] - [@fjell/cache] [set] Key does not match item key: {"kt":"whatever","pk":"123e4567-e89b-12d3-a456-426614174000"} != {"kt":"test","pk":"123e4567-e89b-12d3-a456-426614174000"}
|
|
616
|
+
|
|
617
|
+
✓ tests/primary/Cache.test.ts (13 tests) 12ms
|
|
618
|
+
stderr | tests/Aggregator.test.ts > Aggregator > should throw an error if a mandatory reference is missing
|
|
619
|
+
(1763111382754) [ERROR] - [@fjell/cache] [ItemAggregator] Item does not have mandatory ref with key, not optional [{"key":"other","item":{"key":{"kt":"test","pk":"123e4567-e89b-12d3-a456-426614174000"},"events":{"created":{"at":{}},"updated":{"at":{}},"deleted":{"at":null}},"refs":{}}}]
|
|
620
|
+
|
|
621
|
+
stderr | tests/Aggregator.test.ts > Aggregator > should throw error for missing non-optional references
|
|
622
|
+
(1763111382756) [ERROR] - [@fjell/cache] [ItemAggregator] Item does not have mandatory ref with key, not optional [{"key":"other","item":{"key":{"kt":"test","pk":"123e4567-e89b-12d3-a456-426614174000"},"events":{"created":{"at":{}},"updated":{"at":{}},"deleted":{"at":null}},"refs":{}}}]
|
|
623
|
+
|
|
624
|
+
stderr | tests/Aggregator.test.ts > Aggregator > should throw error for missing references entirely
|
|
625
|
+
(1763111382756) [ERROR] - [@fjell/cache] [ItemAggregator] Item does not have refs an is not optional [{"item":{"key":{"kt":"test","pk":"123e4567-e89b-12d3-a456-426614174000"},"events":{"created":{"at":{}},"updated":{"at":{}},"deleted":{"at":null}}}}]
|
|
626
|
+
|
|
627
|
+
stderr | tests/Aggregator.test.ts > Aggregator > should populate an item with events that is missing events
|
|
628
|
+
(1763111382757) [ERROR] - [@fjell/cache] [ItemAggregator] Item does not have mandatory event with key [{"key":"created","item":{"key":{"kt":"test","pk":"123e4567-e89b-12d3-a456-426614174000"},"events":{"updated":{"at":{}},"deleted":{"at":null}}}}]
|
|
629
|
+
|
|
630
|
+
stderr | tests/Aggregator.test.ts > Aggregator > should populate an item with events when the by key is missing
|
|
631
|
+
(1763111382757) [ERROR] - [@fjell/cache] [ItemAggregator] populateEvent with an Event that does not have by [{"event":{"at":{}},"ik":{"kt":"test","pk":"123e4567-e89b-12d3-a456-426614174000"},"eventKey":"created"}]
|
|
632
|
+
|
|
633
|
+
stderr | tests/Aggregator.test.ts > Aggregator > should throw an error if a mandatory event is missing
|
|
634
|
+
(1763111382757) [ERROR] - [@fjell/cache] [ItemAggregator] Item does not have mandatory event with key [{"key":"created","item":{"key":{"kt":"test","pk":"123e4567-e89b-12d3-a456-426614174000"},"events":{},"refs":{}}}]
|
|
635
|
+
|
|
636
|
+
✓ tests/examples/cache-type-configurations-example.test.ts (32 tests) 17ms
|
|
637
|
+
stderr | tests/ops/remove.test.ts > remove operation > input validation > should throw error for empty object
|
|
638
|
+
(1763111382762) [ERROR] - [@fjell/core] [validation],[KeyValidator] Invalid key structure in remove [{"key":{},"coordinate":{"kta":["test"],"scopes":[]}}]
|
|
639
|
+
|
|
640
|
+
stderr | tests/ops/remove.test.ts > remove operation > input validation > should throw error for malformed key
|
|
641
|
+
(1763111382763) [ERROR] - [@fjell/core] [validation],[KeyValidator] Invalid key structure in remove [{"key":{"invalid":"key"},"coordinate":{"kta":["test"],"scopes":[]}}]
|
|
642
|
+
|
|
643
|
+
stderr | tests/ops/remove.test.ts > remove operation > input validation > should throw error for incomplete primary key
|
|
644
|
+
(1763111382763) [ERROR] - [@fjell/core] [validation],[KeyValidator] Invalid key structure in remove [{"key":{"kt":"test"},"coordinate":{"kta":["test"],"scopes":[]}}]
|
|
645
|
+
|
|
646
|
+
stderr | tests/ops/remove.test.ts > remove operation > input validation > should throw error for null pk
|
|
647
|
+
(1763111382764) [ERROR] - [@fjell/cache] [remove] Key for Remove is not a valid ItemKey: {"kt":"test","pk":null}
|
|
648
|
+
|
|
649
|
+
stderr | tests/ops/remove.test.ts > remove operation > input validation > should throw error for empty string pk
|
|
650
|
+
(1763111382764) [ERROR] - [@fjell/cache] [remove] Key for Remove is not a valid ItemKey: {"kt":"test","pk":""}
|
|
651
|
+
|
|
652
|
+
✓ tests/Aggregator.test.ts (24 tests) 11ms
|
|
653
|
+
stderr | tests/ops/remove.test.ts > remove operation > error handling > should propagate API errors and not delete from cache
|
|
654
|
+
(1763111382765) [ERROR] - [@fjell/cache] [remove] Error deleting item [{"error":{}}]
|
|
655
|
+
|
|
656
|
+
stderr | tests/ops/remove.test.ts > remove operation > error handling > should handle network errors
|
|
657
|
+
(1763111382766) [ERROR] - [@fjell/cache] [remove] Error deleting item [{"error":{}}]
|
|
658
|
+
|
|
659
|
+
stderr | tests/ops/remove.test.ts > remove operation > error handling > should handle API errors with additional properties
|
|
660
|
+
(1763111382766) [ERROR] - [@fjell/cache] [remove] Error deleting item [{"error":{}}]
|
|
661
|
+
|
|
662
|
+
stderr | tests/ops/remove.test.ts > remove operation > operation sequence > should not call cache deletion if API call fails
|
|
663
|
+
(1763111382766) [ERROR] - [@fjell/cache] [remove] Error deleting item [{"error":{}}]
|
|
664
|
+
|
|
665
|
+
stdout | tests/cache/layers/QueryCache.test.ts > QueryCache > Cleanup Operations > should handle cleanup with debug logging enabled
|
|
666
|
+
[QueryCache] Stored query result: debug-query1
|
|
667
|
+
- Items: 1
|
|
668
|
+
- Complete: true
|
|
669
|
+
- TTL: 0.05s
|
|
670
|
+
- Expires: 2025-11-14T09:09:42.817Z
|
|
671
|
+
|
|
672
|
+
stdout | tests/cache/layers/QueryCache.test.ts > QueryCache > Cleanup Operations > should handle cleanup with debug logging enabled
|
|
673
|
+
[QueryCache] Stored query result: debug-query2
|
|
674
|
+
- Items: 1
|
|
675
|
+
- Complete: true
|
|
676
|
+
- TTL: 0.05s
|
|
677
|
+
- Expires: 2025-11-14T09:09:42.817Z
|
|
678
|
+
|
|
679
|
+
stderr | tests/ops/remove.test.ts > remove operation > comprehensive error scenarios > should handle API remove throwing synchronously
|
|
680
|
+
(1763111382768) [ERROR] - [@fjell/cache] [remove] Error deleting item [{"error":{}}]
|
|
681
|
+
|
|
682
|
+
stderr | tests/ops/all.test.ts > all operation > when bypassCache is enabled > should handle API errors properly
|
|
683
|
+
(1763111382771) [ERROR] - [@fjell/cache] [all] API request failed [{"query":{"limit":10},"locations":[{"kt":"container","lk":"container1"}],"error":{}}]
|
|
684
|
+
|
|
685
|
+
✓ tests/ops/remove.test.ts (20 tests) 11ms
|
|
686
|
+
✓ tests/ops/allAction.test.ts (20 tests) 10ms
|
|
687
|
+
✓ tests/ops/all.test.ts (17 tests) 12ms
|
|
688
|
+
stderr | tests/contained/Cache.test.ts > Combined Item Cache Tests > should throw error when setting item with mismatched keys
|
|
689
|
+
(1763111382798) [ERROR] - [@fjell/cache] [set] Key does not match item key: {"kt":"test","pk":"123e4567-e89b-12d3-a456-426614174000"} != {"kt":"test","pk":"123e4567-e89b-12d3-a456-426614174000","loc":[{"kt":"container","lk":"123e4567-e89b-12d3-a456-426614174100"}]}
|
|
690
|
+
|
|
691
|
+
✓ tests/eviction/strategies/ARCEvictionStrategy.test.ts (41 tests) 9ms
|
|
692
|
+
✓ tests/contained/Cache.test.ts (16 tests) 13ms
|
|
693
|
+
✓ tests/normalization.test.ts (37 tests) 8ms
|
|
694
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should prevent cache poisoning from partial faceted query results
|
|
695
|
+
(1763111382833) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
696
|
+
|
|
697
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should prevent cache poisoning from partial faceted query results
|
|
698
|
+
🧪 Testing Cache Poisoning Prevention...
|
|
699
|
+
📊 Step 1: Running faceted Graphics Report query...
|
|
700
|
+
|
|
701
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should prevent cache poisoning from partial faceted query results
|
|
702
|
+
📝 Faceted query returned 1 item(s):
|
|
703
|
+
- GPH: Graphics
|
|
704
|
+
📊 Step 2: Running complete query for all phases...
|
|
705
|
+
|
|
706
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should prevent cache poisoning from partial faceted query results
|
|
707
|
+
📝 Complete query returned 5 items:
|
|
708
|
+
- GPH: Graphics
|
|
709
|
+
- CUT: Cutting
|
|
710
|
+
- FIN: Finishing
|
|
711
|
+
- QC: Quality Control
|
|
712
|
+
- SHP: Shipping
|
|
713
|
+
✅ Cache poisoning prevention successful!
|
|
714
|
+
Faceted query (1 item) did NOT poison complete query (5 items)
|
|
715
|
+
|
|
716
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should cache complete queries but not use them for partial results
|
|
717
|
+
(1763111382838) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
718
|
+
|
|
719
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should cache complete queries but not use them for partial results
|
|
720
|
+
🧪 Testing Query Completeness Isolation...
|
|
721
|
+
📊 Step 1: Running complete query first...
|
|
722
|
+
|
|
723
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should cache complete queries but not use them for partial results
|
|
724
|
+
📊 Step 2: Running complete query again (should be cached)...
|
|
725
|
+
|
|
726
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should cache complete queries but not use them for partial results
|
|
727
|
+
📊 Step 3: Running faceted query (should call API)...
|
|
728
|
+
|
|
729
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should cache complete queries but not use them for partial results
|
|
730
|
+
✅ Query completeness isolation working correctly!
|
|
731
|
+
|
|
732
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should use different TTLs for complete vs partial queries
|
|
733
|
+
(1763111382839) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
734
|
+
|
|
735
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should use different TTLs for complete vs partial queries
|
|
736
|
+
🧪 Testing Different TTL Behavior...
|
|
737
|
+
|
|
738
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should use different TTLs for complete vs partial queries
|
|
739
|
+
✅ TTL configuration verified in implementation
|
|
740
|
+
|
|
741
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should maintain item cache independence from query cache
|
|
742
|
+
(1763111382839) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
743
|
+
|
|
744
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should maintain item cache independence from query cache
|
|
745
|
+
🧪 Testing Item Cache Independence...
|
|
746
|
+
|
|
747
|
+
stdout | tests/integration/CachePoisoningPrevention.test.ts > Cache Poisoning Prevention > should maintain item cache independence from query cache
|
|
748
|
+
✅ Item cache independence maintained!
|
|
749
|
+
|
|
750
|
+
✓ tests/integration/CachePoisoningPrevention.test.ts (4 tests) 10ms
|
|
751
|
+
stdout | tests/cache/layers/QueryCache.test.ts > QueryCache > Cleanup Operations > should handle cleanup with debug logging enabled
|
|
752
|
+
[QueryCache] Cleaned up 2 expired query results
|
|
753
|
+
|
|
754
|
+
✓ tests/utils/CacheSize.edge-cases.test.ts (30 tests) 8ms
|
|
755
|
+
✓ tests/cache/layers/QueryCache.test.ts (36 tests) 664ms
|
|
756
|
+
stderr | tests/ttl/TTLManager.test.ts > TTLManager > error handling and boundary conditions > should handle onItemAdded with missing metadata
|
|
757
|
+
(1763111382878) [WARNING] - [@fjell/cache] [TTLManager] TTL_DEBUG: No metadata found for item when setting TTL [{"key":"nonexistent-key","metadataProviderType":"MockMetadataProvider","metadataProviderMethods":["constructor","getMetadata","setMetadata","deleteMetadata","getAllMetadata","clearMetadata","getCurrentSize","getSizeLimits","setCurrentSize","setSizeLimits"]}]
|
|
758
|
+
|
|
759
|
+
✓ tests/ttl/TTLManager.test.ts (52 tests) 7ms
|
|
760
|
+
stdout | tests/cache/TwoLayerFactory.test.ts > TwoLayerFactory > Auto-Detection > should use provided options in auto-detected cache
|
|
761
|
+
(1763111382916) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"browser/indexedDB","itemTTL":7200,"queryTTL":600,"facetTTL":120}]
|
|
762
|
+
(1763111382917) [INFO] - [@fjell/cache] [TwoLayerFactory] Created two-layer cache from config [{"itemLayerType":"indexedDB","queryTTL":600,"facetTTL":120}]
|
|
763
|
+
|
|
764
|
+
stdout | tests/cache/TwoLayerFactory.test.ts > TwoLayerFactory > Wrapper Functionality > should wrap different cache implementations correctly
|
|
765
|
+
(1763111382918) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
766
|
+
(1763111382918) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/enhanced","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
767
|
+
|
|
768
|
+
stdout | tests/cache/TwoLayerFactory.test.ts > TwoLayerFactory > Factory Method Options > should handle custom configurations for each method
|
|
769
|
+
(1763111382919) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":1800,"queryTTL":180,"facetTTL":30}]
|
|
770
|
+
(1763111382919) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"browser/indexedDB","itemTTL":1800,"queryTTL":180,"facetTTL":30}]
|
|
771
|
+
|
|
772
|
+
stdout | tests/cache/TwoLayerFactory.test.ts > TwoLayerFactory > Debug and Logging > should handle debug logging in factory creation
|
|
773
|
+
(1763111382919) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
774
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerFactory] Created two-layer cache from config [{"itemLayerType":"memory"}]
|
|
775
|
+
|
|
776
|
+
stdout | tests/cache/TwoLayerFactory.test.ts > TwoLayerFactory > Debug and Logging > should create caches with debug mode enabled
|
|
777
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
778
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"browser/indexedDB","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
779
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"browser/localStorage","itemTTL":3600,"queryTTL":180,"facetTTL":30}]
|
|
780
|
+
|
|
781
|
+
stdout | tests/cache/TwoLayerFactory.test.ts > TwoLayerFactory > Factory Performance > should handle concurrent factory calls
|
|
782
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
783
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
784
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
785
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
786
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
787
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
788
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
789
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
790
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
791
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
792
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
793
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
794
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
795
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
796
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
797
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
798
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
799
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
800
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
801
|
+
(1763111382920) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
802
|
+
(1763111382921) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
803
|
+
(1763111382921) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
804
|
+
(1763111382921) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
805
|
+
(1763111382921) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
806
|
+
(1763111382921) [INFO] - [@fjell/cache] [TwoLayerCacheMap] TwoLayerCacheMap initialized [{"underlyingType":"memory/memory","itemTTL":3600,"queryTTL":300,"facetTTL":60}]
|
|
807
|
+
|
|
808
|
+
✓ tests/utils/EvictionStrategies.test.ts (19 tests) 6ms
|
|
809
|
+
✓ tests/cache/TwoLayerFactory.test.ts (42 tests) 9ms
|
|
810
|
+
✓ tests/examples/aggregator-example.integration.test.ts (1 test) 7ms
|
|
811
|
+
✓ tests/Operations.test.ts (11 tests) 7ms
|
|
812
|
+
✓ tests/warming/CacheWarmer.test.ts (20 tests) 760ms
|
|
813
|
+
✓ should handle operation timeout 500ms
|
|
814
|
+
✓ tests/eviction/strategies/FIFOEvictionStrategy.test.ts (26 tests) 6ms
|
|
815
|
+
✓ tests/utils/CacheSize.test.ts (18 tests) 6ms
|
|
816
|
+
✓ tests/integration/CacheTTLEviction.integration.test.ts (11 tests) 5ms
|
|
817
|
+
✓ tests/integration/query-invalidation.test.ts (4 tests) 6ms
|
|
818
|
+
✓ tests/examples/cache-configuration-example.test.ts (8 tests) 7ms
|
|
819
|
+
✓ tests/Options.test.ts (38 tests) 6ms
|
|
820
|
+
stderr | tests/utils/cacheInvalidation.test.ts > Cache Invalidation Utils > invalidateCachesByKeyTypes > should handle registry.get throwing error
|
|
821
|
+
(1763111383035) [WARNING] - [@fjell/cache] [cache],[utils],[cacheInvalidation] Failed to handle location-based invalidation [{"keyTypes":["order"],"error":"Registry error"}]
|
|
822
|
+
(1763111383035) [WARNING] - [@fjell/cache] [cache],[utils],[cacheInvalidation] Failed to handle location-based invalidation [{"keyTypes":["customer"],"error":"Registry error"}]
|
|
823
|
+
|
|
824
|
+
✓ tests/utils/cacheInvalidation.test.ts (10 tests) 5ms
|
|
825
|
+
✓ tests/integration/OptionsIntegration.test.ts (10 tests) 8ms
|
|
826
|
+
✓ tests/ops/reset.test.ts (23 tests) 7ms
|
|
827
|
+
✓ tests/events/CacheEventFactory.test.ts (21 tests) 6ms
|
|
828
|
+
✓ tests/ttl/TTLCalculator.test.ts (28 tests) 6ms
|
|
829
|
+
stderr | tests/eviction/EvictionManager.test.ts > EvictionManager > error handling > should handle strategy errors gracefully
|
|
830
|
+
(1763111383112) [ERROR] - [@fjell/cache] [EvictionManager] Error in eviction strategy onItemAccessed [{"key":"key","error":{}}]
|
|
831
|
+
|
|
832
|
+
stderr | tests/eviction/EvictionManager.test.ts > EvictionManager > error handling > should handle strategy errors gracefully
|
|
833
|
+
(1763111383113) [ERROR] - [@fjell/cache] [EvictionManager] Error in eviction strategy onItemAdded [{"key":"key","error":{}}]
|
|
834
|
+
|
|
835
|
+
stderr | tests/eviction/EvictionManager.test.ts > EvictionManager > error handling > should handle strategy errors gracefully
|
|
836
|
+
(1763111383114) [ERROR] - [@fjell/cache] [EvictionManager] Error in eviction strategy onItemRemoved [{"key":"key","error":{}}]
|
|
837
|
+
|
|
838
|
+
stderr | tests/eviction/EvictionManager.test.ts > EvictionManager > error handling > should handle strategy errors gracefully
|
|
839
|
+
(1763111383114) [ERROR] - [@fjell/cache] [EvictionManager] Error in manual eviction [{"error":{}}]
|
|
840
|
+
|
|
841
|
+
✓ tests/eviction/strategies/TwoQueueEvictionStrategy.test.ts (20 tests) 5ms
|
|
842
|
+
✓ tests/eviction/EvictionManager.test.ts (10 tests) 5ms
|
|
843
|
+
✓ tests/eviction/strategies/RandomEvictionStrategy.test.ts (10 tests) 5ms
|
|
844
|
+
✓ tests/Aggregator.extended.test.ts (9 tests) 5ms
|
|
845
|
+
✓ tests/Options.enhanced.test.ts (20 tests) 5ms
|
|
846
|
+
✓ tests/CacheStats.test.ts (24 tests) 5ms
|
|
847
|
+
✓ tests/eviction/EvictionStrategyConfig.test.ts (17 tests) 4ms
|
|
848
|
+
✓ tests/Cache.string-number-keys.test.ts (4 tests) 8ms
|
|
849
|
+
✓ tests/eviction/strategies/MRUEvictionStrategy.test.ts (18 tests) 5ms
|
|
850
|
+
✓ tests/Instance.integration.test.ts (11 tests) 7ms
|
|
851
|
+
✓ tests/examples/cache-size-and-eviction-example.test.ts (16 tests) 5ms
|
|
852
|
+
✓ tests/ops/facet.test.ts (5 tests) 4ms
|
|
853
|
+
✓ tests/Instance.test.ts (13 tests) 3ms
|
|
854
|
+
✓ tests/CacheInfo.test.ts (4 tests) 3ms
|
|
855
|
+
✓ tests/Registry.test.ts (7 tests) 3ms
|
|
856
|
+
✓ tests/Cache.integration.test.ts (6 tests) 4ms
|
|
857
|
+
✓ tests/Cache.test.ts (3 tests) 3ms
|
|
858
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Statistics and Monitoring > should cleanup and log when debug enabled
|
|
859
|
+
[ItemCache] Stored item: debug-key (expires: 2025-11-14T09:09:43.761Z)
|
|
860
|
+
|
|
861
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Logging > should log operations when debug enabled
|
|
862
|
+
[ItemCache] Stored item: debug-key (expires: 2025-11-14T10:09:43.715Z)
|
|
863
|
+
|
|
864
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Logging > should log operations when debug enabled
|
|
865
|
+
[ItemCache] Cache hit for key: debug-key
|
|
866
|
+
|
|
867
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Logging > should log operations when debug enabled
|
|
868
|
+
[ItemCache] Cache hit for key: debug-key
|
|
869
|
+
|
|
870
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Logging > should log operations when debug enabled
|
|
871
|
+
[ItemCache] Deleted item: debug-key (existed: true)
|
|
872
|
+
|
|
873
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Logging > should log operations when debug enabled
|
|
874
|
+
[ItemCache] Cleared 0 items
|
|
875
|
+
|
|
876
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Statistics Accuracy > should accurately count mixed valid and expired items
|
|
877
|
+
[ItemCache] Cleaned up 1 expired items
|
|
878
|
+
|
|
879
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Mode Behaviors > should provide detailed logging in debug mode
|
|
880
|
+
[ItemCache] Stored item: debug-operations-key (expires: 2025-11-14T10:09:43.928Z)
|
|
881
|
+
|
|
882
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Mode Behaviors > should provide detailed logging in debug mode
|
|
883
|
+
[ItemCache] Cache hit for key: debug-operations-key
|
|
884
|
+
|
|
885
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Mode Behaviors > should provide detailed logging in debug mode
|
|
886
|
+
[ItemCache] Deleted item: debug-operations-key (existed: true)
|
|
887
|
+
|
|
888
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Mode Behaviors > should provide detailed logging in debug mode
|
|
889
|
+
[ItemCache] Cleared 0 items
|
|
890
|
+
|
|
891
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Mode Behaviors > should handle expired item logging in debug mode
|
|
892
|
+
[ItemCache] Stored item: expiring-debug-key (expires: 2025-11-14T09:09:43.979Z)
|
|
893
|
+
|
|
894
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Mode Behaviors > should handle expired item logging in debug mode
|
|
895
|
+
[ItemCache] Expired item removed: expiring-debug-key
|
|
896
|
+
|
|
897
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Mode Behaviors > should handle cleanup logging in debug mode
|
|
898
|
+
[ItemCache] Stored item: cleanup-debug-1 (expires: 2025-11-14T09:09:44.079Z)
|
|
899
|
+
|
|
900
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Mode Behaviors > should handle cleanup logging in debug mode
|
|
901
|
+
[ItemCache] Stored item: cleanup-debug-2 (expires: 2025-11-14T09:09:44.079Z)
|
|
902
|
+
|
|
903
|
+
stdout | tests/cache/layers/ItemCache.test.ts > ItemCache > Debug Mode Behaviors > should handle cleanup logging in debug mode
|
|
904
|
+
[ItemCache] Cleaned up 2 expired items
|
|
905
|
+
|
|
906
|
+
✓ tests/cache/layers/ItemCache.test.ts (37 tests) 1930ms
|
|
907
|
+
✓ should use custom TTL when provided 1102ms
|
|
908
|
+
✓ tests/integration/TTLPersistence.integration.test.ts (3 tests) 2611ms
|
|
909
|
+
✓ should persist TTL metadata and validate expiration across cache lifecycle 2507ms
|
|
910
|
+
✓ tests/examples/cache-stats-example.test.ts (9 tests) 10830ms
|
|
911
|
+
✓ should calculate hit ratio correctly 5620ms
|
|
912
|
+
✓ should handle cache operations that result in errors gracefully 5200ms
|
|
913
|
+
|
|
914
|
+
Test Files 74 passed (74)
|
|
915
|
+
Tests 1746 passed | 12 skipped (1758)
|
|
916
|
+
Start at 01:09:41
|
|
917
|
+
Duration 11.61s (transform 2.40s, setup 471ms, collect 4.75s, tests 18.99s, environment 6ms, prepare 834ms)
|
|
918
|
+
|
|
919
|
+
% Coverage report from v8
|
|
920
|
+
-------------------|---------|----------|---------|---------|-------------------
|
|
921
|
+
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
|
|
922
|
+
-------------------|---------|----------|---------|---------|-------------------
|
|
923
|
+
All files | 86.75 | 77.3 | 87.8 | 86.75 |
|
|
924
|
+
src | 67.42 | 61.31 | 67.78 | 66.87 |
|
|
925
|
+
Aggregator.ts | 94.24 | 88.33 | 88.46 | 94.11 | ...13,387,443-445
|
|
926
|
+
Cache.ts | 100 | 90.32 | 100 | 100 | 150,158,226
|
|
927
|
+
CacheContext.ts | 100 | 100 | 100 | 100 |
|
|
928
|
+
CacheMap.ts | 100 | 100 | 100 | 100 |
|
|
929
|
+
CacheStats.ts | 100 | 100 | 100 | 100 |
|
|
930
|
+
Instance.ts | 100 | 100 | 100 | 100 |
|
|
931
|
+
...nceFactory.ts | 96.15 | 100 | 85.71 | 96.15 | 101
|
|
932
|
+
Operations.ts | 17.81 | 8.05 | 38.02 | 14.22 | ...76,197,209-793
|
|
933
|
+
Options.ts | 98.19 | 92.45 | 100 | 98.13 | 298,400
|
|
934
|
+
Registry.ts | 100 | 100 | 100 | 100 |
|
|
935
|
+
logger.ts | 100 | 100 | 100 | 100 |
|
|
936
|
+
normalization.ts | 100 | 91.66 | 100 | 100 | 119-168
|
|
937
|
+
src/cache | 100 | 100 | 100 | 100 |
|
|
938
|
+
...yerFactory.ts | 100 | 100 | 100 | 100 |
|
|
939
|
+
src/cache/layers | 93.98 | 88.57 | 98.24 | 93.86 |
|
|
940
|
+
ItemCache.ts | 97.95 | 96.96 | 100 | 97.95 | 28
|
|
941
|
+
QueryCache.ts | 91.56 | 86.27 | 100 | 91.56 | ...,98-99,140,157
|
|
942
|
+
...erCacheMap.ts | 94.02 | 86.81 | 97.36 | 93.79 | ...45-346,353,410
|
|
943
|
+
...cache/patterns | 78.87 | 66.66 | 77.77 | 78.87 |
|
|
944
|
+
...idateCache.ts | 78.87 | 66.66 | 77.77 | 78.87 | ...88-289,317-331
|
|
945
|
+
src/cache/warming | 80.95 | 59.61 | 83.87 | 80.34 |
|
|
946
|
+
CacheWarmer.ts | 80.95 | 59.61 | 83.87 | 80.34 | ...53,411,438-447
|
|
947
|
+
src/events | 86.09 | 79.04 | 90.74 | 86.91 |
|
|
948
|
+
...entEmitter.ts | 84.83 | 74.8 | 88.23 | 85.88 | ...88,402,426-431
|
|
949
|
+
...entFactory.ts | 91.11 | 92.5 | 95 | 90.9 | 47,70-73
|
|
950
|
+
...EventTypes.ts | 0 | 0 | 0 | 0 |
|
|
951
|
+
index.ts | 0 | 0 | 0 | 0 |
|
|
952
|
+
src/eviction | 96.72 | 93.8 | 96 | 96.72 |
|
|
953
|
+
...ionManager.ts | 92.15 | 81.81 | 90 | 92.15 | 169-175
|
|
954
|
+
...onStrategy.ts | 100 | 95 | 100 | 100 | 186
|
|
955
|
+
...tegyConfig.ts | 100 | 100 | 100 | 100 |
|
|
956
|
+
...egyFactory.ts | 100 | 93.75 | 100 | 100 | 56,68
|
|
957
|
+
...Validation.ts | 97.26 | 95.39 | 100 | 97.26 | 299,308,323-325
|
|
958
|
+
index.ts | 0 | 0 | 0 | 0 |
|
|
959
|
+
...ion/strategies | 92.9 | 73.86 | 100 | 93.59 |
|
|
960
|
+
...onStrategy.ts | 90.62 | 75.65 | 100 | 90.9 | ...20,359,385,405
|
|
961
|
+
...onStrategy.ts | 95.65 | 83.33 | 100 | 95.45 | 23
|
|
962
|
+
...onStrategy.ts | 98.29 | 77.33 | 100 | 99.02 | 243
|
|
963
|
+
...onStrategy.ts | 95.65 | 66.66 | 100 | 95.45 | 23
|
|
964
|
+
...onStrategy.ts | 91.3 | 75 | 100 | 100 | 23-35
|
|
965
|
+
...onStrategy.ts | 95.83 | 66.66 | 100 | 95.65 | 23
|
|
966
|
+
...onStrategy.ts | 90.54 | 69.67 | 100 | 91.36 | ...26,267,300-309
|
|
967
|
+
src/memory | 96.86 | 90 | 97.67 | 96.73 |
|
|
968
|
+
...ryCacheMap.ts | 97.14 | 88.88 | 100 | 97.05 | ...83,416,563,572
|
|
969
|
+
...ryCacheMap.ts | 96.45 | 92.3 | 94.73 | 96.24 | ...90,296,349,355
|
|
970
|
+
src/ops | 92.51 | 82.83 | 94.11 | 92.45 |
|
|
971
|
+
action.ts | 84.61 | 54.54 | 100 | 84.61 | 61-62,75-82
|
|
972
|
+
all.ts | 96.96 | 90 | 100 | 96.87 | 138-139
|
|
973
|
+
allAction.ts | 89.85 | 71.42 | 100 | 89.7 | 90-96,101-108
|
|
974
|
+
allFacet.ts | 100 | 66.66 | 100 | 100 | 31
|
|
975
|
+
create.ts | 91.66 | 100 | 100 | 91.66 | 66-67
|
|
976
|
+
facet.ts | 100 | 66.66 | 100 | 100 | 32
|
|
977
|
+
find.ts | 96 | 85.71 | 100 | 95.91 | 120-121
|
|
978
|
+
findOne.ts | 90.9 | 77.77 | 100 | 90.9 | 64,100,114-115
|
|
979
|
+
get.ts | 88.54 | 86.66 | 62.5 | 88.42 | 24-35,96-97,180
|
|
980
|
+
one.ts | 92.42 | 89.28 | 100 | 92.42 | 106-113
|
|
981
|
+
remove.ts | 100 | 100 | 100 | 100 |
|
|
982
|
+
reset.ts | 100 | 100 | 100 | 100 |
|
|
983
|
+
retrieve.ts | 100 | 100 | 100 | 100 |
|
|
984
|
+
set.ts | 89.65 | 84 | 100 | 89.65 | ...,81,88,144-145
|
|
985
|
+
update.ts | 94.87 | 75 | 100 | 94.87 | 58-59
|
|
986
|
+
src/ttl | 76.07 | 66.66 | 87.87 | 76.07 |
|
|
987
|
+
TTLCalculator.ts | 85.52 | 75.86 | 100 | 85.52 | ...46,270,275-283
|
|
988
|
+
TTLConfig.ts | 7.89 | 0 | 0 | 7.89 | 178-250
|
|
989
|
+
TTLManager.ts | 95.78 | 94.59 | 88.88 | 95.78 | 315,321,344-349
|
|
990
|
+
index.ts | 0 | 0 | 0 | 0 |
|
|
991
|
+
src/utils | 93.12 | 88.65 | 92.3 | 92.85 |
|
|
992
|
+
CacheSize.ts | 92.77 | 94.28 | 100 | 92.4 | ...61,172,192,201
|
|
993
|
+
...validation.ts | 93.75 | 74.07 | 83.33 | 93.61 | 57,93-96
|
|
994
|
+
-------------------|---------|----------|---------|---------|-------------------
|
|
995
|
+
ERROR: Coverage for branches (77.3%) does not meet global threshold (83%)
|