test: make "remove header" test actually test be havior (#4092)

This commit is contained in:
Yury Semikhatsky 2020-10-14 22:26:56 -07:00 committed by GitHub
parent 3c32c1683a
commit 180aa011d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,7 @@ it('should be able to remove headers', async ({page, server}) => {
await page.route('**/*', route => {
const headers = Object.assign({}, route.request().headers(), {
foo: 'bar',
origin: undefined, // remove "origin" header
accept: undefined, // remove "accept" header
});
route.continue({ headers });
});
@ -110,7 +110,7 @@ it('should be able to remove headers', async ({page, server}) => {
page.goto(server.PREFIX + '/empty.html')
]);
expect(serverRequest.headers.origin).toBe(undefined);
expect(serverRequest.headers.accept).toBe(undefined);
});
it('should contain referer header', async ({page, server}) => {