Skip to content

test(cloudflare): Remove mock in DO tests#21634

Open
JPeer264 wants to merge 1 commit into
developfrom
jp/simplify-test
Open

test(cloudflare): Remove mock in DO tests#21634
JPeer264 wants to merge 1 commit into
developfrom
jp/simplify-test

Conversation

@JPeer264

Copy link
Copy Markdown
Member

Remove the mock and use vi.spyOn directly. I also removed the expect.objectContaining from the attributes.

@JPeer264 JPeer264 requested a review from nicohrubec June 18, 2026 13:24
@JPeer264 JPeer264 self-assigned this Jun 18, 2026
@JPeer264 JPeer264 requested a review from a team as a code owner June 18, 2026 13:24
@JPeer264 JPeer264 requested review from andreiborza and mydea and removed request for a team June 18, 2026 13:24

@andreiborza andreiborza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

const instrumented = instrumentDurableObjectStorage(mockStorage, waitUntil);
const resultPromise = instrumented.setAlarm(Date.now() + 1000);

// Before resolving, waitUntil should not have been called yet

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: are these comments removed on purpose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants