MCPcopy
hub / github.com/CopilotKit/CopilotKit / cleanup

Function cleanup

showcase/scripts/__tests__/create-integration.test.ts:125–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123const WORKFLOW_BASELINES = new Map<string, Buffer>();
124
125function cleanup() {
126 // Remove any scaffolded package dirs the generator produced.
127 for (const slug of TEST_SLUGS) {
128 const dir = path.join(TMP_PACKAGES_DIR, slug);
129 if (fs.existsSync(dir)) {
130 fs.rmSync(dir, { recursive: true, force: true });
131 }
132 }
133 // Restore each seeded workflow to its baseline so the next test starts
134 // with the same anchors the generator's regex edits expect.
135 for (const [p, baseline] of WORKFLOW_BASELINES) {
136 fs.writeFileSync(p, baseline);
137 }
138}
139
140beforeAll(() => {
141 TMP_ROOT = fs.mkdtempSync(path.join(os.tmpdir(), "create-integration-"));

Calls 1

joinMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…