From a4da8e8f6986414d186b788ae1ccef3ffbcb573a Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 11 Sep 2025 18:03:58 +0300 Subject: [PATCH 1/2] test: fix --- .../built-in-routes.test.js.snap.webpack5 | 8 ++++---- test/e2e/range-header.test.js | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/e2e/__snapshots__/built-in-routes.test.js.snap.webpack5 b/test/e2e/__snapshots__/built-in-routes.test.js.snap.webpack5 index b3c2b4f113..026944dcb1 100644 --- a/test/e2e/__snapshots__/built-in-routes.test.js.snap.webpack5 +++ b/test/e2e/__snapshots__/built-in-routes.test.js.snap.webpack5 @@ -46,7 +46,7 @@ exports[`Built in routes with simple config should handle GET request to invalid exports[`Built in routes with simple config should handle GET request to magic async chunk: console messages 1`] = `[]`; -exports[`Built in routes with simple config should handle GET request to magic async chunk: response headers content-type 1`] = `"application/javascript; charset=utf-8"`; +exports[`Built in routes with simple config should handle GET request to magic async chunk: response headers content-type 1`] = `"text/javascript; charset=utf-8"`; exports[`Built in routes with simple config should handle GET request to magic async chunk: response status 1`] = `200`; @@ -62,7 +62,7 @@ exports[`Built in routes with simple config should handle HEAD request to direct exports[`Built in routes with simple config should handle HEAD request to magic async chunk: console messages 1`] = `[]`; -exports[`Built in routes with simple config should handle HEAD request to magic async chunk: response headers content-type 1`] = `"application/javascript; charset=utf-8"`; +exports[`Built in routes with simple config should handle HEAD request to magic async chunk: response headers content-type 1`] = `"text/javascript; charset=utf-8"`; exports[`Built in routes with simple config should handle HEAD request to magic async chunk: response status 1`] = `200`; @@ -70,7 +70,7 @@ exports[`Built in routes with simple config should handles GET request to sockjs exports[`Built in routes with simple config should handles GET request to sockjs bundle: page errors 1`] = `[]`; -exports[`Built in routes with simple config should handles GET request to sockjs bundle: response headers content-type 1`] = `"application/javascript; charset=UTF-8"`; +exports[`Built in routes with simple config should handles GET request to sockjs bundle: response headers content-type 1`] = `"text/javascript; charset=UTF-8"`; exports[`Built in routes with simple config should handles GET request to sockjs bundle: response status 1`] = `200`; @@ -78,6 +78,6 @@ exports[`Built in routes with simple config should handles HEAD request to sockj exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: page errors 1`] = `[]`; -exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response headers content-type 1`] = `"application/javascript; charset=UTF-8"`; +exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response headers content-type 1`] = `"text/javascript; charset=UTF-8"`; exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response status 1`] = `200`; diff --git a/test/e2e/range-header.test.js b/test/e2e/range-header.test.js index 19701cbedb..a1237b583b 100644 --- a/test/e2e/range-header.test.js +++ b/test/e2e/range-header.test.js @@ -27,7 +27,7 @@ describe("'Range' header", () => { expect(response.status).toBe(200); expect(response.headers["content-type"]).toBe( - "application/javascript; charset=utf-8", + "text/javascript; charset=utf-8", ); expect(response.headers["accept-ranges"]).toBe("bytes"); @@ -38,7 +38,7 @@ describe("'Range' header", () => { expect(responseRange.status).toBe(206); expect(responseRange.headers["content-type"]).toBe( - "application/javascript; charset=utf-8", + "text/javascript; charset=utf-8", ); expect(responseRange.headers["content-length"]).toBe("500"); expect(responseRange.headers["content-range"]).toMatch(/^bytes 0-499\//); @@ -51,7 +51,7 @@ describe("'Range' header", () => { expect(response.status).toBe(200); expect(response.headers["content-type"]).toBe( - "application/javascript; charset=utf-8", + "text/javascript; charset=utf-8", ); expect(response.headers["accept-ranges"]).toBe("bytes"); @@ -61,7 +61,7 @@ describe("'Range' header", () => { expect(responseRange.status).toBe(206); expect(responseRange.headers["content-type"]).toBe( - "application/javascript; charset=utf-8", + "text/javascript; charset=utf-8", ); expect(responseRange.headers["content-length"]).toBe("500"); expect(responseRange.headers["content-range"]).toMatch(/^bytes 0-499\//); @@ -72,7 +72,7 @@ describe("'Range' header", () => { expect(response.status).toBe(200); expect(response.headers["content-type"]).toBe( - "application/javascript; charset=utf-8", + "text/javascript; charset=utf-8", ); expect(response.headers["accept-ranges"]).toBe("bytes"); @@ -92,7 +92,7 @@ describe("'Range' header", () => { expect(response.status).toBe(200); expect(response.headers["content-type"]).toBe( - "application/javascript; charset=utf-8", + "text/javascript; charset=utf-8", ); expect(response.headers["accept-ranges"]).toBe("bytes"); @@ -103,7 +103,7 @@ describe("'Range' header", () => { expect(responseRange.status).toBe(200); expect(responseRange.headers["content-type"]).toBe( - "application/javascript; charset=utf-8", + "text/javascript; charset=utf-8", ); expect(responseRange.text).toBe(responseContent); expect(responseRange.text).toHaveLength(responseContent.length); From 8769de7a0454f2bed1acd766729314f97b925ba9 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Thu, 11 Sep 2025 18:10:26 +0300 Subject: [PATCH 2/2] test: fix --- test/e2e/__snapshots__/built-in-routes.test.js.snap.webpack5 | 4 ++-- .../__snapshots__/web-socket-server-url.test.js.snap.webpack5 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/__snapshots__/built-in-routes.test.js.snap.webpack5 b/test/e2e/__snapshots__/built-in-routes.test.js.snap.webpack5 index 026944dcb1..789e304fbe 100644 --- a/test/e2e/__snapshots__/built-in-routes.test.js.snap.webpack5 +++ b/test/e2e/__snapshots__/built-in-routes.test.js.snap.webpack5 @@ -70,7 +70,7 @@ exports[`Built in routes with simple config should handles GET request to sockjs exports[`Built in routes with simple config should handles GET request to sockjs bundle: page errors 1`] = `[]`; -exports[`Built in routes with simple config should handles GET request to sockjs bundle: response headers content-type 1`] = `"text/javascript; charset=UTF-8"`; +exports[`Built in routes with simple config should handles GET request to sockjs bundle: response headers content-type 1`] = `"application/javascript; charset=UTF-8"`; exports[`Built in routes with simple config should handles GET request to sockjs bundle: response status 1`] = `200`; @@ -78,6 +78,6 @@ exports[`Built in routes with simple config should handles HEAD request to sockj exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: page errors 1`] = `[]`; -exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response headers content-type 1`] = `"text/javascript; charset=UTF-8"`; +exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response headers content-type 1`] = `"application/javascript; charset=UTF-8"`; exports[`Built in routes with simple config should handles HEAD request to sockjs bundle: response status 1`] = `200`; diff --git a/test/e2e/__snapshots__/web-socket-server-url.test.js.snap.webpack5 b/test/e2e/__snapshots__/web-socket-server-url.test.js.snap.webpack5 index e939b218c7..2640f84902 100644 --- a/test/e2e/__snapshots__/web-socket-server-url.test.js.snap.webpack5 +++ b/test/e2e/__snapshots__/web-socket-server-url.test.js.snap.webpack5 @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`web socket server URL should not work and output disconnect wrong web socket URL ("sockjs"): console messages 1`] = ` [