MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / withTempDir

Function withTempDir

packages/core/analytics/src/analytics.test.ts:57–62  ·  view source on GitHub ↗
(use: (dir: string) => Effect.Effect<A, E>)

Source from the content-addressed store, hash-verified

55 });
56
57const withTempDir = <A, E>(use: (dir: string) => Effect.Effect<A, E>): Effect.Effect<A, E> =>
58 Effect.acquireUseRelease(
59 Effect.promise(() => mkdtemp(join(tmpdir(), "executor-analytics-"))),
60 use,
61 (dir) => Effect.promise(() => rm(dir, { recursive: true, force: true })),
62 );
63
64const testConfig = (dataDir: string) => ({
65 surface: "cli" as const,

Callers 1

analytics.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected