(/** @type {IFs} */ fs)
| 1184 | }; |
| 1185 | |
| 1186 | const createProjectFsInfo = (/** @type {IFs} */ fs) => { |
| 1187 | /** @type {import("../lib/logging/Logger").Logger & Record<string, (...args: unknown[]) => unknown>} */ |
| 1188 | const logger = |
| 1189 | /** @type {import("../lib/logging/Logger").Logger & Record<string, (...args: unknown[]) => unknown>} */ ( |
| 1190 | /** @type {unknown} */ ({ |
| 1191 | error: (/** @type {unknown[]} */ ...args) => { |
| 1192 | throw new Error(util.format(...args)); |
| 1193 | } |
| 1194 | }) |
| 1195 | ); |
| 1196 | for (const method of ["warn", "info", "log", "debug"]) { |
| 1197 | logger[method] = () => {}; |
| 1198 | } |
| 1199 | return new FileSystemInfo( |
| 1200 | /** @type {import("../lib/util/fs").InputFileSystem} */ ( |
| 1201 | /** @type {unknown} */ (fs) |
| 1202 | ), |
| 1203 | { logger, hashFunction: "sha256" } |
| 1204 | ); |
| 1205 | }; |
| 1206 | |
| 1207 | it("collects files, directories and resolve results across cjs/esm", (done) => { |
| 1208 | const fs = createProjectFs(); |
no outgoing calls
no test coverage detected