Skip to content

Commit adb1393

Browse files
committed
resett mocks
1 parent 722732b commit adb1393

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

packages/cloudflare/test/durableobject.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ describe('instrumentDurableObjectWithSentry', () => {
115115
}
116116
});
117117

118-
it('flush performs after all waitUntil promises are finished', async () => {
118+
// Run sequentially to avoid global spy interference from parallel tests
119+
it.sequential('flush performs after all waitUntil promises are finished', async () => {
119120
vi.useFakeTimers();
120121
onTestFinished(() => {
121122
vi.useRealTimers();

packages/cloudflare/test/handler.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ function addDelayedWaitUntil(context: ExecutionContext) {
3535
context.waitUntil(new Promise<void>(resolve => setTimeout(() => resolve())));
3636
}
3737

38-
describe('withSentry', () => {
38+
// Run tests sequentially to avoid global spy interference from parallel tests
39+
describe.sequential('withSentry', () => {
3940
beforeEach(() => {
4041
vi.clearAllMocks();
4142
});

packages/cloudflare/test/request.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ function addDelayedWaitUntil(context: ExecutionContext) {
1818
context.waitUntil(new Promise<void>(resolve => setTimeout(() => resolve())));
1919
}
2020

21-
describe('withSentry', () => {
21+
// Run tests sequentially to avoid global spy interference from parallel tests
22+
describe.sequential('withSentry', () => {
2223
beforeAll(() => {
2324
setAsyncLocalStorageAsyncContextStrategy();
2425
});

0 commit comments

Comments
 (0)