dir
uses node:fs
Where the tests write the files they analyze: an ES module package.
import fs from "node:fs"; import os from "node:os"; import path from "node:path"; export const dir = (() => { const d = fs.mkdtempSync(path.join(os.tmpdir(), "tcm-core-")); fs.writeFileSync(path.join(d, "package.json"), JSON.stringify({ type: "module" })); return d; })()
used by
- tcmts.core.test.hash.analyze
- tcmts.core.test.hash.analyzeTsx
- tcmts.core.test.hash.project
- tcmts.core.test.hash.testComputedKeysNameValues
- tcmts.core.test.hash.testJsxComponentTagsAreReferencesByHash
- tcmts.core.test.hash.testJsxLayoutDoesntCountKeptTextDoes
- tcmts.core.test.hash.testLineageSaltsSeparateIdenticalCode
- tcmts.core.test.hash.testNamespaceImportsLeaveTypesToTheirNames
- tcmts.core.test.hash.testPackageReexportsHashAsImports
- tcmts.core.test.hash.testPackagesArePinnedByCompatibleRange
- tcmts.core.test.hash.testSetupStatementsJoinTheirConstant
- tcmts.core.test.hash.testUnsupportedConstructsAreRejected