Skip to content

Commit 52d48fc

Browse files
committed
test: add e2e tests for proxy option
1 parent d89a64d commit 52d48fc

File tree

2 files changed

+439
-0
lines changed

2 files changed

+439
-0
lines changed

test/e2e/__snapshots__/proxy.test.js.snap.webpack5

+56
Original file line numberDiff line numberDiff line change
@@ -277,3 +277,59 @@ exports[`proxy option should supports http methods errors: page errors 1`] = `Ar
277277
exports[`proxy option should supports http methods errors: response status 1`] = `500`;
278278

279279
exports[`proxy option should supports http methods errors: response text 1`] = `"error from proxy"`;
280+
281+
exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options target respects a proxy option when a request path is matched: console messages 1`] = `
282+
Array [
283+
"Failed to load resource: the server responded with a status of 504 (Gateway Timeout)",
284+
]
285+
`;
286+
287+
exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options target respects a proxy option when a request path is matched: page errors 1`] = `Array []`;
288+
289+
exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options target respects a proxy option when a request path is matched: response status 1`] = `504`;
290+
291+
exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options target respects a proxy option when a request path is matched: response text 1`] = `"Error occured while trying to proxy: localhost:8123/my-path"`;
292+
293+
exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options with \`silent\` value target respects a proxy option when a request path is matched: console messages 1`] = `
294+
Array [
295+
"Failed to load resource: the server responded with a status of 504 (Gateway Timeout)",
296+
]
297+
`;
298+
299+
exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options with \`silent\` value target respects a proxy option when a request path is matched: page errors 1`] = `Array []`;
300+
301+
exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options with \`silent\` value target respects a proxy option when a request path is matched: response status 1`] = `504`;
302+
303+
exports[`proxy option should work and respect \`logProvider\` and \`logLevel\` options with \`silent\` value target respects a proxy option when a request path is matched: response text 1`] = `"Error occured while trying to proxy: localhost:8123/my-path"`;
304+
305+
exports[`proxy option should work and respect the \`infrastructureLogging.level\` option target respects a proxy option when a request path is matched: console messages 1`] = `
306+
Array [
307+
"Failed to load resource: the server responded with a status of 504 (Gateway Timeout)",
308+
]
309+
`;
310+
311+
exports[`proxy option should work and respect the \`infrastructureLogging.level\` option target respects a proxy option when a request path is matched: page errors 1`] = `Array []`;
312+
313+
exports[`proxy option should work and respect the \`infrastructureLogging.level\` option target respects a proxy option when a request path is matched: response status 1`] = `504`;
314+
315+
exports[`proxy option should work and respect the \`infrastructureLogging.level\` option target respects a proxy option when a request path is matched: response text 1`] = `"Error occured while trying to proxy: localhost:8123/my-path"`;
316+
317+
exports[`proxy option should work and respect the \`infrastructureLogging.level\` option with \`none\` value target respects a proxy option when a request path is matched: console messages 1`] = `
318+
Array [
319+
"Failed to load resource: the server responded with a status of 504 (Gateway Timeout)",
320+
]
321+
`;
322+
323+
exports[`proxy option should work and respect the \`infrastructureLogging.level\` option with \`none\` value target respects a proxy option when a request path is matched: page errors 1`] = `Array []`;
324+
325+
exports[`proxy option should work and respect the \`infrastructureLogging.level\` option with \`none\` value target respects a proxy option when a request path is matched: response status 1`] = `504`;
326+
327+
exports[`proxy option should work and respect the \`infrastructureLogging.level\` option with \`none\` value target respects a proxy option when a request path is matched: response text 1`] = `"Error occured while trying to proxy: localhost:8123/my-path"`;
328+
329+
exports[`proxy option should work in multi compiler mode respects a proxy option: console messages 1`] = `Array []`;
330+
331+
exports[`proxy option should work in multi compiler mode respects a proxy option: page errors 1`] = `Array []`;
332+
333+
exports[`proxy option should work in multi compiler mode respects a proxy option: response status 1`] = `200`;
334+
335+
exports[`proxy option should work in multi compiler mode respects a proxy option: response text 1`] = `"from proxy1"`;

0 commit comments

Comments
 (0)