We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8105e8 commit 712971dCopy full SHA for 712971d
src/index.ts
@@ -10,7 +10,7 @@ export const interfaceVersion = 2;
10
export const resolve: typeof resolveTs = function (source, file, config) {
11
if (source.startsWith("bun:")) {
12
log("matched bun modules:", source);
13
- return { found: true };
+ return { found: true, path: null };
14
}
15
return resolveTs(source, file, config);
16
};
test/index.test.ts
@@ -5,10 +5,15 @@ test("interfaceVersion", () => {
5
});
6
7
test.each([
8
- { source: "fs", found: true },
9
- { source: "node:fs", found: true },
- { source: "not_found", found: false },
- { source: "bun:test", found: true },
-])("resolve $source => found $found", ({ source, found }) => {
- expect(resolve(source, "").found).toBe(found);
-});
+ { source: "fs", found: true, path: null },
+ { source: "node:fs", found: true, path: null },
+ { source: "not_found", found: false, path: undefined },
+ { source: "bun:test", found: true, path: null },
+])(
+ "resolve $source => found: $found, path: $path",
+ ({ source, found, path }) => {
+ const result = resolve(source, "");
+ expect(result.found).toBe(found);
17
+ expect(result.path).toBe(path);
18
+ }
19
+);
0 commit comments