Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch().then() is undefined #4

Closed
SpeCT opened this issue Jul 14, 2024 · 1 comment
Closed

fetch().then() is undefined #4

SpeCT opened this issue Jul 14, 2024 · 1 comment

Comments

@SpeCT
Copy link
Contributor

SpeCT commented Jul 14, 2024

test('GET foo', async () => {
  mock('https://example.com/', { data: { name: 'Foo' } })
  const res = await fetch('https://example.com/).then(r => r.json()) // <<- crash
  expect(res.name).toBe('Foo') // <<- never
})
@DRFR0ST
Copy link
Owner

DRFR0ST commented Jul 23, 2024

Thanks for the contribution @SpeCT 🚀
Your PRs has been merged and are included in the 1.0.9 release.

@DRFR0ST DRFR0ST closed this as completed Jul 23, 2024
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

No branches or pull requests

2 participants