MCPcopy Create free account
hub / github.com/Effect-TS/effect / extract

Function extract

packages/tools/api-diff/test/Snapshot.test.ts:121–127  ·  view source on GitHub ↗
(repoRoot: string)

Source from the content-addressed store, hash-verified

119 yield* writeFixturePackage(leftRoot, { "Choice.d.ts": "export type Choice = string | number\n" })
120 yield* writeFixturePackage(rightRoot, { "Choice.d.ts": "export type Choice = number | string\n" })
121 const extract = (repoRoot: string) =>
122 snapshotter.extract({
123 repoRoot,
124 ref: "fixture",
125 sha: "0000000000000000000000000000000000000000",
126 modules: ["@fixture/sample/Choice"]
127 }).pipe(Effect.map((snapshot) => snapshot.entities[0]?.fingerprint))
128 assert.strictEqual(yield* extract(leftRoot), yield* extract(rightRoot))
129 }).pipe(Effect.provide(MainLayer)))
130})

Callers 1

Snapshot.test.tsFile · 0.70

Calls 2

pipeMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected