MCPcopy
hub / github.com/coder/mux / cleanup

Function cleanup

tests/ui/workspaces/subagents.test.ts:156–173  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154 return view;
155 },
156 async cleanup() {
157 if (view && cleanupDom) {
158 await cleanupView(view, cleanupDom);
159 } else if (cleanupDom) {
160 cleanupDom();
161 }
162
163 for (const workspaceId of workspaceIdsToRemove.reverse()) {
164 try {
165 await env.orpc.workspace.remove({ workspaceId, options: { force: true } });
166 } catch {
167 // Best effort cleanup.
168 }
169 }
170
171 await cleanupTestEnvironment(env);
172 await cleanupTempGitRepo(repoPath);
173 },
174 };
175 } catch (error) {
176 await cleanupTestEnvironment(env);

Calls 4

cleanupViewFunction · 0.90
cleanupTestEnvironmentFunction · 0.90
cleanupTempGitRepoFunction · 0.90
removeMethod · 0.65

Tested by

no test coverage detected