(readFile?: string)
| 18 | }); |
| 19 | |
| 20 | function createFs(readFile?: string) { |
| 21 | return createMockFileSystemExecutor({ |
| 22 | existsSync: (targetPath) => targetPath === configPath && readFile != null, |
| 23 | readFile: async (targetPath) => { |
| 24 | if (targetPath !== configPath) { |
| 25 | throw new Error(`Unexpected readFile path: ${targetPath}`); |
| 26 | } |
| 27 | if (readFile == null) { |
| 28 | throw new Error('readFile called without fixture content'); |
| 29 | } |
| 30 | return readFile; |
| 31 | }, |
| 32 | }); |
| 33 | } |
| 34 | |
| 35 | it('uses defaults when config is missing and overrides are not provided', async () => { |
| 36 | await initConfigStore({ cwd, fs: createFs() }); |
no test coverage detected