Skip to content

Commit 36300c0

Browse files
Merge master into feature/dynamodb
2 parents 9e0ecbd + 803c641 commit 36300c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/core/src/test/shared/telemetry/spans.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,17 @@ describe('TelemetrySpan', function () {
9696

9797
describe('TelemetryTracer', function () {
9898
let tracer: TelemetryTracer
99-
let clock: ReturnType<typeof installFakeClock>
99+
let clock: ReturnType<typeof installFakeClock> | undefined
100100
let sandbox: SinonSandbox
101101
const metricName = 'test_metric' as MetricName
102102

103103
beforeEach(function () {
104104
tracer = new TelemetryTracer()
105-
clock = installFakeClock()
106105
sandbox = sinon.createSandbox()
107106
})
108107

109108
afterEach(function () {
110-
clock.uninstall()
109+
clock?.uninstall()
111110
sandbox.restore()
112111
})
113112

@@ -269,11 +268,12 @@ describe('TelemetryTracer', function () {
269268
})
270269

271270
it('records performance', function () {
271+
clock = installFakeClock()
272272
const { expectedCpuUsage, expectedHeapTotal } = stubPerformance(sandbox)
273273
tracer.run(
274274
'function_call',
275275
() => {
276-
clock.tick(90)
276+
clock?.tick(90)
277277
},
278278
{
279279
trackPerformance: true,

0 commit comments

Comments
 (0)