(
/** @type {(err?: Error | null, fs?: IFs, snapshot?: Snapshot | null) => void} */ callback
)
| 597 | class="cm">// cache miss and re-read from disk so snapshots stay valid. |
| 598 | describe(class="st">"existence-only watchpack entries", () => { |
| 599 | const buildFsInfoWithSnapshot = ( |
| 600 | /** @type {(err?: Error | null, fs?: IFs, snapshot?: Snapshot | null) => void} */ callback |
| 601 | ) => { |
| 602 | const fs = createFs(); |
| 603 | const fsInfo = createFsInfo(fs); |
| 604 | fsInfo.createSnapshot( |
| 605 | Date.now() + 10000, |
| 606 | files, |
| 607 | directories, |
| 608 | missing, |
| 609 | /** @type {SnapshotOptions} */ ( |
| 610 | /** @type {unknown} */ ([class="st">"timestamp", { timestamp: true }]) |
| 611 | ), |
| 612 | (err, snapshot) => { |
| 613 | if (err) return callback(err); |
| 614 | callback(null, fs, snapshot); |
| 615 | } |
| 616 | ); |
| 617 | }; |
| 618 | |
| 619 | const onlyNonIgnored = (/** @type {string[]} */ paths) => |
| 620 | paths.filter((/** @type {string} */ p) => !ignored.includes(p)); |
no test coverage detected