MCPcopy
hub / github.com/vitest-dev/vitest / cleanup

Function cleanup

test/cli/test/init.test.ts:15–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13 return cleanup
14
15 async function cleanup() {
16 for (const file of await getFiles()) {
17 if (file !== 'package.json') {
18 await rm(`${cwd}/${file}`, { recursive: true })
19 }
20 }
21 await writeFile(`${cwd}/vitest.config.ts`, '{}', 'utf8')
22 }
23})
24
25test('initializes project', async () => {

Callers 2

init.test.tsFile · 0.70
workspaces.test.tsFile · 0.50

Calls 3

writeFileFunction · 0.85
getFilesFunction · 0.70
rmFunction · 0.50

Tested by

no test coverage detected