Skip to content

Commit 005813c

Browse files
committed
update tests
1 parent 615b754 commit 005813c

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

packages/bundler-plugin-core/src/utils/__tests__/normalizePath.test.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,38 @@ const tests: Test[] = [
8383
},
8484
expected: "test.*",
8585
},
86+
{
87+
name: "should replace '[hash:22]' with '*'",
88+
input: {
89+
path: "test.123.chunk.js",
90+
format: "[name].[hash:22].chunk.js",
91+
},
92+
expected: "test.*.chunk.js",
93+
},
94+
{
95+
name: "should replace '[contenthash:22]' with '*'",
96+
input: {
97+
path: "test.123.chunk.js",
98+
format: "[name].[contenthash:22].chunk.js",
99+
},
100+
expected: "test.*.chunk.js",
101+
},
102+
{
103+
name: "should replace '[fullhash:22]' with '*'",
104+
input: {
105+
path: "test.123.chunk.js",
106+
format: "[name].[fullhash:22].chunk.js",
107+
},
108+
expected: "test.*.chunk.js",
109+
},
110+
{
111+
name: "should replace '[chunkhash:22]' with '*'",
112+
input: {
113+
path: "test.123.chunk.js",
114+
format: "[name].[chunkhash:22].chunk.js",
115+
},
116+
expected: "test.*.chunk.js",
117+
},
86118
];
87119

88120
describe("normalizePath", () => {

0 commit comments

Comments
 (0)