Skip to content

Commit 6f66c73

Browse files
committed
fix test
1 parent 672b24c commit 6f66c73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/browser/test/unit/profiling/hubextensions.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe('BrowserProfilingIntegration', () => {
6767
// @ts-expect-error force api to be undefined
6868
global.window.Profiler = undefined;
6969
// set sampled to true so that profiling does not early return
70-
const mockTransaction = { sampled: true } as Transaction;
70+
const mockTransaction = { isRecording: () => true } as Transaction;
7171
expect(() => onProfilingStartRouteTransaction(mockTransaction)).not.toThrow();
7272
});
7373
it('does not throw if constructor throws', () => {
@@ -80,8 +80,8 @@ describe('BrowserProfilingIntegration', () => {
8080
}
8181
}
8282

83-
// set sampled to true so that profiling does not early return
84-
const mockTransaction = { sampled: true } as Transaction;
83+
// set isRecording to true so that profiling does not early return
84+
const mockTransaction = { isRecording: () => true } as Transaction;
8585

8686
// @ts-expect-error override with our own constructor
8787
global.window.Profiler = Profiler;

0 commit comments

Comments
 (0)