testDefaultExportOfADefinitionIsUsedByName
An imported module's export default types names a definition it declares: a default import of the module is a
use of that definition.
import { project } from "#codebase/tcmts/core/test/hash"; import assert from "node:assert/strict"; export const testDefaultExportOfADefinitionIsUsedByName = () => { const p = project({ "mime.ts": `const types = { html: "text/html" };\nexport default types;\n`, "use.ts": `import standard from "./mime.ts";\nexport const html = () => standard.html;\n`, }); assert.deepEqual(Object.keys(p).sort(), ["html", "types"]); assert.ok(JSON.stringify(p.html!.deps).includes(p.types!.hash), "the default import is `types`"); }