(
fs: MockFileSystem,
breakHashes: {[url: string]: boolean} = {},
baseHref = '/',
)
| 272 | } |
| 273 | |
| 274 | export function tmpHashTableForFs( |
| 275 | fs: MockFileSystem, |
| 276 | breakHashes: {[url: string]: boolean} = {}, |
| 277 | baseHref = '/', |
| 278 | ): {[url: string]: string} { |
| 279 | const table: {[url: string]: string} = {}; |
| 280 | fs.list().forEach((filePath) => { |
| 281 | const urlPath = joinPaths(baseHref, filePath); |
| 282 | const file = fs.lookup(filePath)!; |
| 283 | if (file.hashThisFile) { |
| 284 | table[urlPath] = file.hash; |
| 285 | if (breakHashes[filePath]) { |
| 286 | table[urlPath] = table[urlPath].split('').reverse().join(''); |
| 287 | } |
| 288 | } |
| 289 | }); |
| 290 | return table; |
| 291 | } |
| 292 | |
| 293 | export function tmpHashTable(manifest: Manifest): Map<string, string> { |
| 294 | const map = new Map<string, string>(); |
no test coverage detected
searching dependent graphs…