test(javascript): verify CommonJS file URL boundaries via CLI and MCP (#2061)

* fix(javascript): keep CommonJS file URL strings unresolved

* test(mcp): align completion checks with warm provider state

* test(javascript): remove superseded file URL resolver coverage

---------

Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
This commit is contained in:
hhangandhhang authored and GitHub committed 2026-10-13 06:03:45 +09:00
1 parent 91b8f587cd
commit 6ce5903e7a
2 files changed
+52 -22

No files matched your search

@@ -576,27 +576,6 @@ describe("contextual JavaScript artifact path resolution", () => {
});
});
describe("CommonJS file URL resolution", () => {
it("keeps file URL resolution specific to the import loader", () => {
const files = fileMap([file("entry.cjs", "root"), file("dep.cjs", "root")]);
const input = {
declaredPath: "file:///dep.cjs",
sourcePath: "entry.cjs",
context: "module-specifier" as const,
files,
};
expect(resolve({ ...input, moduleKind: "require" })).toMatchObject({
resolution_status: "external",
resolved_path: null,
});
expect(resolve({ ...input, moduleKind: "import" })).toMatchObject({
resolution_status: "resolved",
resolved_path: "dep.cjs",
});
});
});
describe("contextual JavaScript package path resolution", () => {
it("follows package entrypoints beyond the former recursion ceiling", () => {
const files = fileMap([