(content: string, ...pathSegments: string[])
| 22 | } |
| 23 | |
| 24 | async function createTestFile(content: string, ...pathSegments: string[]) { |
| 25 | const fullPath = path.join(testRootDir, ...pathSegments); |
| 26 | await fsPromises.mkdir(path.dirname(fullPath), { recursive: true }); |
| 27 | await fsPromises.writeFile(fullPath, content); |
| 28 | return fullPath; |
| 29 | } |
| 30 | |
| 31 | beforeEach(async () => { |
| 32 | testRootDir = await fsPromises.mkdtemp( |
no test coverage detected