test: request method is overridden (#15089)

This commit is contained in:
Yury Semikhatsky 2022-06-24 16:26:12 -07:00 committed by GitHub
parent 660516d22a
commit 53404ad167
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -193,11 +193,11 @@ it('should amend method', async ({ page, server }) => {
await page.route('**/*', route => route.fallback({ method: 'POST' }));
const [request] = await Promise.all([
server.waitForRequest('/sleep.zzz'),
page.waitForRequest('**/sleep.zzz'),
page.evaluate(() => fetch('/sleep.zzz'))
]);
expect(method).toBe('POST');
expect(request.method).toBe('POST');
expect(request.method()).toBe('POST');
expect((await sRequest).method).toBe('POST');
});