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

[middleware] add tests for body reading methods #37980

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: linter
Kikobeats authored and Schniz committed Oct 17, 2022
commit 2b8408b1c90cff8f72cd814af6f27aea74ec2599
16 changes: 8 additions & 8 deletions test/e2e/edge-can-read-request-body/index.test.ts
Original file line number Diff line number Diff line change
@@ -6,6 +6,14 @@ import Primitives from '@edge-runtime/primitives'

const { FormData, fetch } = Primitives

async function serialize(response: Response) {
return {
text: await response.text(),
headers: Object.fromEntries(response.headers),
status: response.status,
}
}

describe('Edge can read request body', () => {
let next: NextInstance

@@ -105,11 +113,3 @@ describe('Edge can read request body', () => {
})
})
})

async function serialize(response: Response) {
return {
text: await response.text(),
headers: Object.fromEntries(response.headers),
status: response.status,
}
}