Skip to content

Commit f0879db

Browse files
committed
Fix tests
1 parent 5aa7b75 commit f0879db

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

packages/integration-tests/suites/tracing/browsertracing/long-tasks-disabled/test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ sentryTest('should not capture long task when flag is disabled.', async ({ brows
1515
const url = await getLocalTestPath({ testDir: __dirname });
1616

1717
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
18-
console.log(eventData);
19-
// const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui'));
18+
const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui'));
2019

21-
// expect(uiSpanse?.length).toBe(0);
22-
expect([].length).toBe(0);
20+
expect(uiSpans?.length).toBe(1);
2321
});

packages/integration-tests/suites/tracing/browsertracing/long-tasks-enabled/assets/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
return time - startTime;
77
}
88

9-
while (getElasped() < 101) {
9+
while (getElasped() < 105) {
1010
//
1111
}
1212
})();

packages/tracing/test/browser/browsertracing.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ describe('BrowserTracing', () => {
8989
const browserTracing = createBrowserTracing();
9090

9191
expect(browserTracing.options).toEqual({
92+
_experiments: {
93+
enableLongTask: true,
94+
},
9295
idleTimeout: DEFAULT_IDLE_TIMEOUT,
9396
finalTimeout: DEFAULT_FINAL_TIMEOUT,
9497
markBackgroundTransactions: true,

0 commit comments

Comments
 (0)