Skip to content

Commit 65d30a6

Browse files
fixup! implement webpack chunks file updating using ast manipulation
update test descriptions
1 parent 50b65e2 commit 65d30a6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

builder/src/build/patches/investigated/update-webpack-chunks-file/get-chunk-installation-identifiers.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { getChunkInstallationIdentifiers } from "./get-chunk-installation-identi
66
import { getWebpackChunksFileTsSource } from "./get-webpack-chunks-file-ts-source";
77

88
describe("getChunkInstallationIdentifiers", () => {
9-
test("works as expected on unminified code", async () => {
9+
test("gets chunk identifiers from unminified code", async () => {
1010
const fileContent = await readFile(
1111
`${import.meta.dirname}/test-fixtures/unminified-webpacks-file.js`,
1212
"utf8"
@@ -17,7 +17,7 @@ describe("getChunkInstallationIdentifiers", () => {
1717
expect(installedChunks).toEqual("installedChunks");
1818
});
1919

20-
test("works as expected on minified code", async () => {
20+
test("gets chunk identifiers from minified code", async () => {
2121
const fileContent = await readFile(
2222
`${import.meta.dirname}/test-fixtures/minified-webpacks-file.js`,
2323
"utf8"

builder/src/build/patches/investigated/update-webpack-chunks-file/get-file-content-with-updated-webpack-f-require-code.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { getFileContentWithUpdatedWebpackFRequireCode } from "./get-file-content
66
import { getWebpackChunksFileTsSource } from "./get-webpack-chunks-file-ts-source";
77

88
describe("getFileContentWithUpdatedWebpackFRequireCode", () => {
9-
test("works as expected on unminified code", async () => {
9+
test("returns the updated content of the f.require function from unminified webpack runtime code", async () => {
1010
const fileContent = await readFile(
1111
`${import.meta.dirname}/test-fixtures/unminified-webpacks-file.js`,
1212
"utf8"
@@ -23,7 +23,7 @@ describe("getFileContentWithUpdatedWebpackFRequireCode", () => {
2323
);
2424
});
2525

26-
test("works as expected on minified code", async () => {
26+
test("returns the updated content of the f.require function from minified webpack runtime code", async () => {
2727
const fileContent = await readFile(
2828
`${import.meta.dirname}/test-fixtures/minified-webpacks-file.js`,
2929
"utf8"

builder/src/build/patches/investigated/update-webpack-chunks-file/get-updated-webpack-chunks-file-content.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { expect, test, describe } from "vitest";
55
import { getUpdatedWebpackChunksFileContent } from "./get-updated-webpack-chunks-file-content";
66

77
describe("getUpdatedWebpackChunksFileContent", () => {
8-
test("works as expected on unminified code", async () => {
8+
test("returns the updated content of a webpack runtime chunks unminified file", async () => {
99
const fileContent = await readFile(
1010
`${import.meta.dirname}/test-fixtures/unminified-webpacks-file.js`,
1111
"utf8"
@@ -14,7 +14,7 @@ describe("getUpdatedWebpackChunksFileContent", () => {
1414
expect(updatedContent).toMatchFileSnapshot("./test-snapshots/unminified-webpacks-file.js");
1515
});
1616

17-
test("works as expected on minified code", async () => {
17+
test("returns the updated content of a webpack runtime chunks minified file", async () => {
1818
const fileContent = await readFile(
1919
`${import.meta.dirname}/test-fixtures/minified-webpacks-file.js`,
2020
"utf8"

0 commit comments

Comments
 (0)