Skip to content

Commit

Permalink
test: add e2e tests for client option
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Sep 25, 2021
1 parent ea6727e commit 34403ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
8 changes: 2 additions & 6 deletions test/e2e/__snapshots__/client.test.js.snap.webpack4
@@ -1,14 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`client option configure client entry should disable client entry: console messages 1`] = `
Array [
"Failed to load resource: the server responded with a status of 404 (Not Found)",
]
`;
exports[`client option configure client entry should disable client entry: console messages 1`] = `Array []`;

exports[`client option configure client entry should disable client entry: page errors 1`] = `Array []`;

exports[`client option configure client entry should disable client entry: response status 1`] = `404`;
exports[`client option configure client entry should disable client entry: response status 1`] = `200`;

exports[`client option default behaviour responds with a 200 status code for /ws path: console messages 1`] = `Array []`;

Expand Down
8 changes: 2 additions & 6 deletions test/e2e/__snapshots__/client.test.js.snap.webpack5
@@ -1,14 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`client option configure client entry should disable client entry: console messages 1`] = `
Array [
"Failed to load resource: the server responded with a status of 404 (Not Found)",
]
`;
exports[`client option configure client entry should disable client entry: console messages 1`] = `Array []`;

exports[`client option configure client entry should disable client entry: page errors 1`] = `Array []`;

exports[`client option configure client entry should disable client entry: response status 1`] = `404`;
exports[`client option configure client entry should disable client entry: response status 1`] = `200`;

exports[`client option default behaviour responds with a 200 status code for /ws path: console messages 1`] = `Array []`;

Expand Down
9 changes: 3 additions & 6 deletions test/e2e/client.test.js
Expand Up @@ -178,12 +178,9 @@ describe("client option", () => {
pageErrors.push(error);
});

const response = await page.goto(
`http://127.0.0.1:${port}/foo/test/bar`,
{
waitUntil: "networkidle0",
}
);
const response = await page.goto(`http://127.0.0.1:${port}/main.js`, {
waitUntil: "networkidle0",
});

expect(response.status()).toMatchSnapshot("response status");

Expand Down

0 comments on commit 34403ab

Please sign in to comment.