Skip to content

Commit 0c62564

Browse files
committed
fix tests
1 parent 5adcbe2 commit 0c62564

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/tracing/test/browser/metrics.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import { Span, Transaction } from '../../src';
2-
import { _startChild, addResourceSpans, MetricsInstrumentation, ResourceEntry } from '../../src/browser/metrics';
2+
import {
3+
_startChild,
4+
addResourceSpans,
5+
DEFAULT_METRICS_INSTR_OPTIONS,
6+
MetricsInstrumentation,
7+
ResourceEntry,
8+
} from '../../src/browser/metrics';
39
import { addDOMPropertiesToGlobal } from '../testutils';
410

511
// eslint-disable-next-line @typescript-eslint/no-explicit-any, no-var
@@ -178,7 +184,7 @@ describe('MetricsInstrumentation', () => {
178184
jest.spyOn(MetricsInstrumentation.prototype as any, tracker),
179185
);
180186

181-
new MetricsInstrumentation();
187+
new MetricsInstrumentation(DEFAULT_METRICS_INSTR_OPTIONS);
182188

183189
trackers.forEach(tracker => expect(tracker).not.toBeCalled());
184190
});
@@ -191,7 +197,7 @@ describe('MetricsInstrumentation', () => {
191197
const trackers = ['_trackCLS', '_trackLCP', '_trackFID'].map(tracker =>
192198
jest.spyOn(MetricsInstrumentation.prototype as any, tracker),
193199
);
194-
new MetricsInstrumentation();
200+
new MetricsInstrumentation(DEFAULT_METRICS_INSTR_OPTIONS);
195201
global.process = backup;
196202

197203
trackers.forEach(tracker => expect(tracker).toBeCalled());

0 commit comments

Comments
 (0)