diff --git a/test/fixture/hello-linked.mjs b/test/fixture/hello.link.mjs similarity index 100% rename from test/fixture/hello-linked.mjs rename to test/fixture/hello.link.mjs diff --git a/test/fixture/test.link.txt b/test/fixture/test.link.txt new file mode 120000 index 0000000..541cb64 --- /dev/null +++ b/test/fixture/test.link.txt @@ -0,0 +1 @@ +test.txt \ No newline at end of file diff --git a/test/fixture/test.txt b/test/fixture/test.txt new file mode 100644 index 0000000..524acff --- /dev/null +++ b/test/fixture/test.txt @@ -0,0 +1 @@ +Test file diff --git a/test/resolve.test.ts b/test/resolve.test.ts index d5d28fe..c1a2d50 100644 --- a/test/resolve.test.ts +++ b/test/resolve.test.ts @@ -38,10 +38,15 @@ describe("resolveSync", () => { } it("follows symlinks", () => { - const resolved = resolveSync("./fixture/hello-linked", { + const resolved = resolveSync("./fixture/hello.link", { url: import.meta.url, }); expect(fileURLToPath(resolved)).match(/fixture\/hello\.mjs$/); + + const resolved2 = resolveSync("./fixture/test.link.txt", { + url: import.meta.url, + }); + expect(fileURLToPath(resolved2)).match(/fixture\/test.txt$/); }); });