{"version":3,"file":"dist-Mvv-K3Er.mjs","names":["V.describe","it","V.it","internal.it"],"sources":["../../../../node_modules/.pnpm/@effect+vitest@4.1.2_effect@4.1.2_vitest@5.0.3_@types+node@26.2.0_vite@7.3.2_@types+nod_a2fffe0deec250ef9d6207b86a9a1ab8/node_modules/@effect/vitest/dist/internal/internal.js","../../../../node_modules/.pnpm/@effect+vitest@4.1.2_effect@4.1.2_vitest@5.0.3_@types+node@26.2.0_vite@7.3.2_@types+nod_a2fffe0deec250ef9d6207b86a9a1ab8/node_modules/@effect/vitest/dist/index.js"],"sourcesContent":["/**\n * @since 4.0.0\n */\nimport * as Arbitrary from \"effect/Arbitrary\";\nimport * as Cause from \"effect/Cause\";\nimport * as Duration from \"effect/Duration\";\nimport * as Effect from \"effect/Effect\";\nimport * as Exit from \"effect/Exit\";\nimport * as Fiber from \"effect/Fiber\";\nimport { constVoid, flow, pipe } from \"effect/Function\";\nimport * as Layer from \"effect/Layer\";\nimport * as Schedule from \"effect/Schedule\";\nimport * as Scope from \"effect/Scope\";\nimport * as TestClock from \"effect/testing/TestClock\";\nimport * as TestConsole from \"effect/testing/TestConsole\";\nimport * as V from \"vitest\";\nconst getCurrentSuite = V.TestRunner.getCurrentSuite;\nconst runPromise = (effect, ctx) => Effect.runPromise(\n// Only the test is interruptible: once the signal aborts, the fiber stops\n// at its next interruptible step, which would skip reporting the defects\n// raised by finalizers.\nEffect.uninterruptibleMask(restore => Effect.gen(function* () {\n  const exit = yield* Effect.exit(restore(effect));\n  if (Exit.isFailure(exit)) {\n    const errors = Cause.prettyErrors(exit.cause);\n    for (let i = 0; i < errors.length; i++) {\n      yield* Effect.logError(errors[i]);\n    }\n  }\n  return yield* exit;\n})), {\n  signal: ctx?.signal\n});\nconst settleOnAbort = (ctx, promise) => {\n  // Vitest stops awaiting the promise once the signal aborts (timeout or\n  // cancellation), so only then add a hook that waits for the finalizers.\n  // Registering it unconditionally would change the teardown of every test.\n  const onAbort = () => ctx.onTestFinished(() => promise.then(constVoid, constVoid));\n  ctx.signal.addEventListener(\"abort\", onAbort, {\n    once: true\n  });\n  const cleanup = () => ctx.signal.removeEventListener(\"abort\", onAbort);\n  promise.then(cleanup, cleanup);\n  // A retry after a timed-out attempt reuses the aborted signal, so no event fires.\n  if (ctx.signal.aborted) onAbort();\n  return promise;\n};\n/** @internal */\nconst runTest = ctx => effect => {\n  const promise = runPromise(effect, ctx);\n  return ctx ? settleOnAbort(ctx, promise) : promise;\n};\nconst TestEnv = /*#__PURE__*/Layer.mergeAll(TestConsole.layer, /*#__PURE__*/TestClock.layer());\n/** @internal */\nexport const addEqualityTesters = () => {\n  V.expect.addEqualityTesters([]);\n};\n/** @internal */\nconst testOptions = timeout => typeof timeout === \"number\" ? {\n  timeout\n} : timeout ?? {};\nconst hookTimeout = timeout => timeout === undefined ? undefined : Duration.toMillis(Duration.fromInputUnsafe(timeout));\nconst propertyTestOptions = timeout => typeof timeout === \"number\" ? undefined : timeout;\nconst checkOptions = timeout => propertyTestOptions(timeout)?.arbitrary;\nconst compileArbitraryInput = input => Arbitrary.isArbitrary(input) ? input : Arbitrary.schema(input);\nconst makeArbitrary = arbitraries => Arbitrary.all(Array.isArray(arbitraries) ? arbitraries.map(compileArbitraryInput) : Object.fromEntries(Object.entries(arbitraries).map(([key, input]) => [key, compileArbitraryInput(input)])));\nconst normalizeProperty = (property, value) => Effect.catchCause(Effect.suspend(() => {\n  const output = property(value);\n  return Effect.isEffect(output) ? output : Effect.succeed(output);\n}), cause => Cause.hasInterrupts(cause) ? Effect.failCause(cause) : Effect.fail(cause));\nconst runCheck = (ctx, arbitrary, property, options) => runTest(ctx)(Effect.flatMapEager(Arbitrary.checkEffect(arbitrary, value => normalizeProperty(property, value), options), result => {\n  const failure = Arbitrary.formatCheckFailure(result);\n  return failure === undefined ? Effect.void : Effect.die(new Error(failure));\n}));\n// Vitest decides which fixtures to set up by parsing the source of a test\n// function's context parameter, and there is no public API to supply the names\n// for a wrapper, so wrappers expose the source of the function they call.\nconst withFixturesOf = (source, f) => Object.defineProperty(f, \"toString\", {\n  value: () => source.toString()\n});\nconst runHook = (fn, run) => withFixturesOf(fn, (...args) => {\n  const result = fn(...args);\n  if (!Effect.isEffect(result)) {\n    return result;\n  }\n  const scope = Scope.makeUnsafe();\n  // Everything the hook leaves behind lives in the scope: the resources it\n  // acquired and, ahead of them, a cleanup function it returned. On failure\n  // the scope closes inside the fiber, so interrupting it awaits the release.\n  const effect = Scope.provide(result, scope).pipe(Effect.flatMap(cleanup => typeof cleanup === \"function\" ? Scope.addFinalizer(scope, Effect.promise(async () => await cleanup())) : Effect.void), Effect.onError(cause => Scope.close(scope, Exit.failCause(cause))));\n  return run(args, effect, scope);\n});\n// Closing must outlive an already-aborted signal, so it runs without one.\nconst closeHookScope = scope => runPromise(Scope.close(scope, Exit.void));\n/** @internal */\nexport const beforeAll = (fn, timeout) => {\n  let dispose = () => Promise.resolve();\n  // Vitest drops the cleanup of a setup that outlives its timeout, so the\n  // scope is disposed by the cleanup of a hook registered just before this\n  // one. It runs in the same cleanup phase, in the slot next to this hook's,\n  // with this hook's timeout.\n  V.beforeAll(() => () => dispose(), timeout);\n  V.beforeAll(runHook(fn, (_, effect, scope) => {\n    const fiber = Effect.runFork(effect);\n    // Interrupting a setup that Vitest stopped waiting for awaits its release.\n    dispose = () => runPromise(Effect.andThen(Fiber.interrupt(fiber), Scope.close(scope, Exit.void)));\n    return runPromise(Fiber.join(fiber));\n  }), timeout);\n};\n/** @internal */\nexport const beforeEach = (fn, timeout) => V.beforeEach(runHook(fn, ([ctx], effect, scope) =>\n// The scope closes when Vitest runs the hook's cleanup after the test,\n// and the next test waits for it even if that cleanup times out.\nrunTest(ctx)(effect).then(() => () => settleOnAbort(ctx, closeHookScope(scope)))), timeout);\nconst makeItProxy = (it, overrides) => new Proxy(it, {\n  apply(target, thisArg, argArray) {\n    return Reflect.apply(target, thisArg, argArray);\n  },\n  get(target, property, receiver) {\n    if (Object.hasOwn(overrides, property)) {\n      return Reflect.get(overrides, property);\n    }\n    // do not bind: binding would strip vitest's static helpers (e.g. `describe.each`)\n    return Reflect.get(target, property, receiver);\n  }\n});\nconst collectTasks = (tasks, acc = []) => {\n  for (let i = 0; i < tasks.length; i++) {\n    const task = tasks[i];\n    if (task.type === \"test\" && task.mode !== \"skip\" && task.mode !== \"todo\") {\n      acc.push(task);\n    } else if (task.tasks !== undefined) {\n      collectTasks(task.tasks, acc);\n    }\n  }\n  return acc;\n};\nconst runsMoreThanOnce = task => {\n  const retry = typeof task.retry === \"number\" ? task.retry : task.retry?.count;\n  return (retry ?? 0) > 0 || (task.repeats ?? 0) > 0;\n};\nconst registerProp = (it, name, arbitraries, property, timeout) => {\n  const arbitrary = makeArbitrary(arbitraries);\n  // Property callbacks receive only the base context; the empty source requests no fixtures.\n  it(name, testOptions(timeout), withFixturesOf(() => {}, ctx => runCheck(ctx, arbitrary, values => property(values, ctx), checkOptions(timeout))));\n};\nconst makeTester = (mapEffect, it) => {\n  const run = (ctx, args, self) => pipe(Effect.suspend(() => self(...args)), mapEffect, runTest(ctx));\n  const register = test => (name, self, timeout) => test(name, testOptions(timeout), withFixturesOf(self, ctx => run(ctx, [ctx], self)));\n  const each = cases => (name, self, timeout) => it.for(cases)(name, testOptions(timeout), withFixturesOf(self, (args, ctx) => run(ctx, [args, ctx], self).then(constVoid)));\n  const prop = (name, arbitraries, self, timeout) => registerProp(it, name, arbitraries, (values, ctx) => Effect.mapEager(mapEffect(Effect.suspend(() => self(values, ctx))), value => value !== false), timeout);\n  return Object.assign(register(it), {\n    skip: register(it.skip),\n    skipIf: condition => register(it.skipIf(condition)),\n    runIf: condition => register(it.runIf(condition)),\n    only: register(it.only),\n    each,\n    fails: register(it.fails),\n    prop\n  });\n};\nconst makeProp = it => (name, arbitraries, self, timeout) => registerProp(it, name, arbitraries, (values, ctx) => {\n  const result = self(values, ctx);\n  if (result !== undefined && typeof result !== \"boolean\") {\n    throw new TypeError(\"it.prop callbacks must return boolean or void. Use it.effect.prop for Effect callbacks.\");\n  }\n  return result !== false;\n}, timeout);\nconst makeLayer = it => (layer_, options) => (...args) => {\n  const excludeTestServices = options?.excludeTestServices ?? false;\n  const withTestEnv = excludeTestServices ? layer_ : Layer.provideMerge(layer_, TestEnv);\n  const memoMap = options?.memoMap ?? Effect.runSync(Layer.makeMemoMap);\n  const buildPerTest = options?.buildPerTest ?? false;\n  const suiteOptions = options?.concurrent === undefined ? {} : {\n    concurrent: options.concurrent\n  };\n  const makeBlockMethods = provide => makeItProxy(it, {\n    effect: makeTester(effect => provide(Effect.scoped(effect)), it),\n    prop: makeProp(it),\n    flakyTest,\n    layer(nestedLayer, nestedOptions) {\n      return makeLayer(it)(Layer.provideMerge(nestedLayer, withTestEnv), {\n        ...nestedOptions,\n        memoMap: Layer.forkMemoMapUnsafe(memoMap),\n        excludeTestServices,\n        // The services of a per-test block only exist during a test, so\n        // blocks nested in it are built per test as well.\n        buildPerTest: buildPerTest || nestedOptions?.buildPerTest === true\n      });\n    }\n  });\n  if (buildPerTest) {\n    // Each test builds into its own fork of the memo map, so it reuses the\n    // services of enclosing blocks and releases the rest when it finishes.\n    const methods = makeBlockMethods(effect => Effect.scopedWith(scope => Layer.buildWithMemoMap(withTestEnv, Layer.forkMemoMapUnsafe(memoMap), scope).pipe(Effect.orDie, Effect.flatMap(context => Effect.provide(effect, context)))));\n    if (args.length === 1) {\n      return args[0](methods);\n    }\n    return V.describe(args[0], suiteOptions, () => args[1](methods));\n  }\n  const scope = Effect.runSync(Scope.make());\n  const contextEffect = Layer.buildWithMemoMap(withTestEnv, memoMap, scope).pipe(Effect.orDie, Effect.cached, Effect.runSync);\n  let closed = false;\n  const closeScope = () => {\n    if (closed) {\n      return Promise.resolve();\n    }\n    closed = true;\n    // Layer cleanup must outlive the last test's already-aborted signal.\n    return runPromise(Scope.close(scope, Exit.void));\n  };\n  const methods = makeBlockMethods(effect => Effect.flatMap(contextEffect, context => Effect.provide(effect, context)));\n  if (args.length === 1) {\n    const currentSuite = getCurrentSuite();\n    const previousTasks = new Set(currentSuite.tasks);\n    args[0](methods);\n    const blockTasks = collectTasks(currentSuite.tasks.filter(task => !previousTasks.has(task)));\n    if (blockTasks.length === 0) {\n      V.afterAll(() => closeScope(), hookTimeout(options?.timeout));\n      return;\n    }\n    const blockTaskSet = new Set(blockTasks);\n    // Vitest runs hooks once per retry and repeat attempt, so a test's last\n    // attempt cannot be counted. Blocks with such tests are released by `afterAll`.\n    const releaseAfterLastTest = !blockTasks.some(runsMoreThanOnce);\n    let remaining = blockTasks.length;\n    V.beforeEach(\n    // Destructured so Vitest can parse the hook once the suite defines fixtures.\n    ({\n      onTestFinished,\n      signal,\n      task\n    }) => {\n      if (!blockTaskSet.has(task)) {\n        return;\n      }\n      if (releaseAfterLastTest) {\n        onTestFinished(() => {\n          remaining--;\n          if (remaining === 0) {\n            return closeScope();\n          }\n        });\n      }\n      return runPromise(Effect.asVoid(contextEffect), {\n        signal\n      });\n    }, hookTimeout(options?.timeout));\n    V.afterAll(() => closeScope(), hookTimeout(options?.timeout));\n    return;\n  }\n  return V.describe(args[0], suiteOptions, () => {\n    V.beforeAll(() => runPromise(Effect.asVoid(contextEffect)), hookTimeout(options?.timeout));\n    V.afterAll(() => closeScope(), hookTimeout(options?.timeout));\n    return args[1](methods);\n  });\n};\n/** @internal */\nexport const flakyTest = (self, timeout = Duration.seconds(30)) => pipe(self, Effect.scoped, Effect.sandbox, Effect.retry(pipe(Schedule.recurs(10), Schedule.while(_ => Effect.succeed(Duration.isLessThanOrEqualTo(Duration.fromInputUnsafe(_.elapsed), Duration.fromInputUnsafe(timeout)))))), Effect.orDie);\n/** @internal */\nexport const makeMethods = it => makeItProxy(it, {\n  effect: makeTester(flow(Effect.scoped, Effect.provide(TestEnv)), it),\n  live: makeTester(Effect.scoped, it),\n  flakyTest,\n  layer: makeLayer(it),\n  prop: makeProp(it)\n});\n/** @internal */\nexport const it = /*#__PURE__*/makeMethods(V.it);\n/** @internal */\nexport const {\n  /** @internal */\n  effect,\n  /** @internal */\n  layer,\n  /** @internal */\n  live,\n  /** @internal */\n  prop\n} = it;\n/** @internal */\nexport const describeWrapped = (name, f) => V.describe(name, () => f(it));\n//# sourceMappingURL=internal.js.map","import * as internal from \"./internal/internal.js\";\n/**\n * Re-exports the `vitest` API unchanged.\n *\n * @stability unstable\n * @since 4.0.0\n */\nexport * from \"vitest\";\n/**\n * Invokes the Effect Vitest equality-tester registration hook.\n *\n * @stability unstable\n * @category utils\n * @since 4.0.0\n */\nexport const addEqualityTesters = internal.addEqualityTesters;\n/**\n * Registers a callback to run once before all tests in the current suite. If\n * the callback returns an `Effect`, it is run and awaited with a `Scope` that\n * closes in a cleanup after the suite's `afterAll` hooks, within the hook's\n * timeout. The `Effect` must not require any other services.\n *\n * **Details**\n *\n * If Vitest stops waiting for the setup, the setup is interrupted before the\n * `Scope` closes. As with any `beforeAll` cleanup, Vitest reports a closing\n * that exceeds the hook's timeout and does not wait for it.\n *\n * @stability unstable\n * @category hooks\n * @since 4.0.0\n */\nexport const beforeAll = internal.beforeAll;\n/**\n * Registers a callback to run before each test in the current suite. If the\n * callback returns an `Effect`, it is run and awaited with a `Scope` that\n * closes when the test finishes, and interrupted if the hook times out. The\n * `Effect` must not require any other services.\n *\n * @stability unstable\n * @category hooks\n * @since 4.0.0\n */\nexport const beforeEach = internal.beforeEach;\n/**\n * Runs a scoped Effect test with test clock and console services.\n *\n * @stability unstable\n * @category testing\n * @since 4.0.0\n */\nexport const effect = internal.effect;\n/**\n * Runs a scoped Effect test with live services.\n *\n * @stability unstable\n * @category testing\n * @since 4.0.0\n */\nexport const live = internal.live;\n/**\n * Share a `Layer` between multiple tests, optionally wrapping\n * the tests in a `describe` block if a name is provided.\n *\n * **Details**\n *\n * Named layers accept `concurrent` to override inherited suite concurrency.\n * Anonymous layers always inherit the enclosing suite's concurrency.\n * Use `ctx.expect` in concurrent tests for test-local snapshots and assertion counts.\n *\n * Pass `buildPerTest: true` to build the layer once per test instead of once\n * per block. Each test gets new services, released when the test finishes,\n * while services from an enclosing `layer` block stay shared. A build failure\n * fails only that test. Blocks nested inside a per-test block are built per\n * test as well. `timeout` has no effect on a per-test block, since the test's\n * own timeout covers the build.\n *\n * **Example** (Sharing layers between tests)\n *\n * ```ts\n * import { assert, layer } from \"@effect/vitest\"\n * import { Effect, Layer, Context } from \"effect\"\n *\n * class Foo extends Context.Service<Foo, \"foo\">()(\"Foo\") {\n *   static layer = Layer.succeed(Foo, \"foo\")\n * }\n *\n * class Bar extends Context.Service<Bar, \"bar\">()(\"Bar\") {\n *   static layer = Layer.effect(\n *     Bar,\n *     Effect.map(Foo, () => \"bar\" as const)\n *   )\n * }\n *\n * layer(Foo.layer)(\"layer\", (it) => {\n *   it.effect(\"adds context\", () =>\n *     Effect.gen(function*() {\n *       const foo = yield* Foo\n *       assert.strictEqual(foo, \"foo\")\n *     }))\n *\n *   it.layer(Bar.layer)(\"nested\", (it) => {\n *     it.effect(\"adds context\", () =>\n *       Effect.gen(function*() {\n *         const foo = yield* Foo\n *         const bar = yield* Bar\n *         assert.strictEqual(foo, \"foo\")\n *         assert.strictEqual(bar, \"bar\")\n *       }))\n *   })\n * })\n * ```\n *\n * **Example** (Building a layer for each test)\n *\n * ```ts\n * import { assert, layer } from \"@effect/vitest\"\n * import { Effect, Layer, Context, Ref } from \"effect\"\n *\n * class Database extends Context.Service<Database, \"database\">()(\"Database\") {\n *   static layer = Layer.succeed(Database, \"database\")\n * }\n *\n * class Cache extends Context.Service<Cache, Ref.Ref<Array<string>>>()(\"Cache\") {\n *   static layer = Layer.effect(\n *     Cache,\n *     Effect.andThen(Database, Ref.make<Array<string>>([]))\n *   )\n * }\n *\n * layer(Database.layer)(\"repository\", (it) => {\n *   // Database is shared, Cache is built for each test\n *   it.layer(Cache.layer, { buildPerTest: true })((it) => {\n *     it.effect(\"writes to the cache\", () =>\n *       Effect.gen(function*() {\n *         const cache = yield* Cache\n *         yield* Ref.update(cache, (keys) => [...keys, \"a\"])\n *         assert.deepStrictEqual(yield* Ref.get(cache), [\"a\"])\n *       }))\n *\n *     it.effect(\"starts with an empty cache\", () =>\n *       Effect.gen(function*() {\n *         const cache = yield* Cache\n *         assert.deepStrictEqual(yield* Ref.get(cache), [])\n *       }))\n *   })\n * })\n * ```\n *\n * @stability unstable\n * @category testing\n * @since 4.0.0\n */\nexport const layer = internal.layer;\n/**\n * Retries a scoped Effect to tolerate intermittent test failures, dying on exhausted retries.\n *\n * @stability unstable\n * @category testing\n * @since 4.0.0\n */\nexport const flakyTest = internal.flakyTest;\n/**\n * Runs a synchronous property test using schemas or arbitraries.\n *\n * @stability unstable\n * @category testing\n * @since 4.0.0\n */\nexport const prop = internal.prop;\n/**\n * Vitest test API extended with Effect test helpers.\n *\n * @stability unstable\n * @category testing\n * @since 4.0.0\n */\nexport const it = internal.it;\n/**\n * Creates the Effect test helpers for a Vitest test API, such as one extended with fixtures.\n *\n * **Details**\n *\n * Tests receive the fixtures they destructure from their context. Vitest sets them up before the test and tears\n * them down after the test's scope closes, as it does for its own tests. `it.effect.each` passes the context\n * after the test case, and named and anonymous `it.layer` blocks keep the fixtures.\n *\n * **Gotchas**\n *\n * Vitest reads the destructured names to decide which fixtures to set up. Once any fixture is defined, a test that\n * takes the whole context as a plain parameter, such as `(ctx) =>`, fails with a `FixtureParseError`. Property\n * tests receive only the base test context and cannot request fixtures; auto fixtures still run.\n *\n * **Example** (Using a Vitest fixture in an Effect test)\n *\n * ```ts\n * import { assert, makeMethods, test } from \"@effect/vitest\"\n * import { Effect } from \"effect\"\n *\n * const it = makeMethods(\n *   test.extend(\"config\", { scope: \"file\" }, () => ({ port: 3000 }))\n * )\n *\n * it.effect(\"reads the config fixture\", ({ config }) =>\n *   Effect.sync(() => {\n *     assert.strictEqual(config.port, 3000)\n *   }))\n * ```\n *\n * @stability unstable\n * @category constructors\n * @since 4.0.0\n */\nexport const makeMethods = internal.makeMethods;\n/**\n * Creates a named Vitest suite whose callback receives Effect test helpers.\n *\n * @stability unstable\n * @category testing\n * @since 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