Skip to content

Commit 5b42e39

Browse files
committed
amend recordsidplugin test to have the same makeRelative method
1 parent 62229f5 commit 5b42e39

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

test/RecordIdsPlugin.test.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ const RecordIdsPlugin = require("../lib/RecordIdsPlugin");
99

1010
function makeRelative(compiler, identifier) {
1111
const context = compiler.context;
12-
return identifier.split("|").map((str) =>
13-
str.split("!")
14-
.map((str) => path.relative(context, str)).join("!")).join("|");
12+
return identifier.split("|")
13+
.map(str => str.split("!")
14+
.map(str => str.split(" ")
15+
.map(str => path.relative(context, str))
16+
.join(" "))
17+
.join("!"))
18+
.join("|");
1519
}
1620

1721
describe("RecordIdsPlugin", () => {

0 commit comments

Comments
 (0)