MCPcopy
hub / github.com/jestjs/jest / cleanup

Function cleanup

e2e/Utils.ts:106–117  ·  view source on GitHub ↗
(directory: string)

Source from the content-addressed store, hash-verified

104 });
105
106export const cleanup = (directory: string) => {
107 try {
108 fs.rmSync(directory, {force: true, recursive: true});
109 } catch (error) {
110 try {
111 // retry once in case of e.g. permission errors
112 fs.rmSync(directory, {force: true, recursive: true});
113 } catch {
114 throw error;
115 }
116 }
117};
118
119/**
120 * Creates a nested directory with files and their contents

Calls

no outgoing calls

Tested by

no test coverage detected