()
| 335 | * @returns CommandExecutor that throws on invocation |
| 336 | */ |
| 337 | export function createNoopFileSystemExecutor(): FileSystemExecutor { |
| 338 | return { |
| 339 | mkdir: async (): Promise<void> => { |
| 340 | throw new Error( |
| 341 | `🚨 NOOP FILESYSTEM EXECUTOR CALLED! 🚨\n` + |
| 342 | `This executor should never be called in this test context.\n` + |
| 343 | `If you see this error, it means the test is exercising a code path that wasn't expected.\n` + |
| 344 | `Either fix the test to avoid this code path, or use createMockFileSystemExecutor() instead.`, |
| 345 | ); |
| 346 | }, |
| 347 | readFile: async (): Promise<string> => { |
| 348 | throw new Error( |
| 349 | `🚨 NOOP FILESYSTEM EXECUTOR CALLED! 🚨\n` + |
| 350 | `This executor should never be called in this test context.\n` + |
| 351 | `If you see this error, it means the test is exercising a code path that wasn't expected.\n` + |
| 352 | `Either fix the test to avoid this code path, or use createMockFileSystemExecutor() instead.`, |
| 353 | ); |
| 354 | }, |
| 355 | writeFile: async (): Promise<void> => { |
| 356 | throw new Error( |
| 357 | `🚨 NOOP FILESYSTEM EXECUTOR CALLED! 🚨\n` + |
| 358 | `This executor should never be called in this test context.\n` + |
| 359 | `If you see this error, it means the test is exercising a code path that wasn't expected.\n` + |
| 360 | `Either fix the test to avoid this code path, or use createMockFileSystemExecutor() instead.`, |
| 361 | ); |
| 362 | }, |
| 363 | createWriteStream: (): WriteStream => { |
| 364 | throw new Error( |
| 365 | `🚨 NOOP FILESYSTEM EXECUTOR CALLED! 🚨\n` + |
| 366 | `This executor should never be called in this test context.\n` + |
| 367 | `If you see this error, it means the test is exercising a code path that wasn't expected.\n` + |
| 368 | `Either fix the test to avoid this code path, or use createMockFileSystemExecutor() instead.`, |
| 369 | ); |
| 370 | }, |
| 371 | cp: async (): Promise<void> => { |
| 372 | throw new Error( |
| 373 | `🚨 NOOP FILESYSTEM EXECUTOR CALLED! 🚨\n` + |
| 374 | `This executor should never be called in this test context.\n` + |
| 375 | `If you see this error, it means the test is exercising a code path that wasn't expected.\n` + |
| 376 | `Either fix the test to avoid this code path, or use createMockFileSystemExecutor() instead.`, |
| 377 | ); |
| 378 | }, |
| 379 | readdir: async (): Promise<unknown[]> => { |
| 380 | throw new Error( |
| 381 | `🚨 NOOP FILESYSTEM EXECUTOR CALLED! 🚨\n` + |
| 382 | `This executor should never be called in this test context.\n` + |
| 383 | `If you see this error, it means the test is exercising a code path that wasn't expected.\n` + |
| 384 | `Either fix the test to avoid this code path, or use createMockFileSystemExecutor() instead.`, |
| 385 | ); |
| 386 | }, |
| 387 | rm: async (): Promise<void> => { |
| 388 | throw new Error( |
| 389 | `🚨 NOOP FILESYSTEM EXECUTOR CALLED! 🚨\n` + |
| 390 | `This executor should never be called in this test context.\n` + |
| 391 | `If you see this error, it means the test is exercising a code path that wasn't expected.\n` + |
| 392 | `Either fix the test to avoid this code path, or use createMockFileSystemExecutor() instead.`, |
| 393 | ); |
| 394 | }, |
no outgoing calls
no test coverage detected