Skip to content

Commit 5b2572b

Browse files
committed
Fix tests
1 parent b01693e commit 5b2572b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/measurements/src/__tests__/context.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,19 +214,19 @@ describe('context', () => {
214214
it('should handle named parameters', () => {
215215
const metrics = newMetrics()
216216
const r = new MeasureMetricsContext('test', { method: 'GET' }, {}, metrics, logger)
217-
expect(r).toBeNull()
217+
expect(r).toBeDefined()
218218
expect(metrics.namedParams.method).toBe('GET')
219219
})
220220

221221
it('should update named parameters on multiple contexts', () => {
222222
const metrics = newMetrics()
223223
const ctx1 = new MeasureMetricsContext('test1', { method: 'GET' }, {}, metrics, logger)
224-
expect(ctx1).toBeNull()
224+
expect(ctx1).toBeDefined()
225225
expect(metrics.namedParams.method).toBe('GET')
226226

227227
// Create another context with different value for same param
228228
const ctx2 = new MeasureMetricsContext('test2', { method: 'POST' }, {}, metrics, logger)
229-
expect(ctx2).toBeNull()
229+
expect(ctx2).toBeDefined()
230230

231231
// The second context will see existing value is different, so it will update to '*'
232232
// But this happens within the constructor logic

0 commit comments

Comments
 (0)