Skip to content

Commit

Permalink
add test for non js modules
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 21, 2024
1 parent 95d9147 commit aa5882a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
File renamed without changes.
1 change: 1 addition & 0 deletions test/fixture/test.link.txt
1 change: 1 addition & 0 deletions test/fixture/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test file
7 changes: 6 additions & 1 deletion test/resolve.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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$/);
});
});

Expand Down

0 comments on commit aa5882a

Please sign in to comment.