Skip to content

Commit 44a2603

Browse files
committed
add unit test to cover new scenario
1 parent 24b3c60 commit 44a2603

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/fallback.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ describe("fallback", function () {
88
const fileSystem = Volume.fromJSON(
99
{
1010
"/a/index": "",
11-
"/a/dir/index": "",
11+
"/a/dir/index": "",
12+
"/a/second/index": "",
1213
"/recursive/index": "",
1314
"/recursive/dir/index": "",
1415
"/recursive/dir/file": "",
@@ -94,6 +95,11 @@ describe("fallback", function () {
9495
expect(resolver.resolveSync({}, "/", "multiAlias/anotherDir")).toBe(
9596
"/e/anotherDir/index"
9697
);
98+
// The multiAlias works as expected when the matching alias is the last one
99+
expect(resolver.resolveSync({}, "/", "multiAlias/second")).toBe(
100+
"/a/second/index"
101+
);
102+
97103
});
98104
it("should log the correct info", done => {
99105
const log = [];

0 commit comments

Comments
 (0)