import { describe, it } from "vitest";
import { Effect } from "effect";
const withSpan = Effect.withSpan("bar", {
attributes: {
foo: "bar",
},
})
describe("foo", () => {
it.only("throws unhandled error", async () => {
await Effect.fail(new Error("foo")).pipe(
withSpan,
Effect.runPromise
);
});
it("fails with a normal error", async () => {
await Effect.fail("foo").pipe(
withSpan,
Effect.runPromise
);
});
it("fails with a normal error", async () => {
await Effect.fail(new Error("foo")).pipe(Effect.runPromise);
});
});
import { describe, it } from "vitest";
import { Effect } from "effect";
const withSpan = Effect.withSpan("bar", {
attributes: {
foo: "bar",
},
})
describe("foo", () => {
it.only("throws unhandled error", async () => {
await Effect.fail(new Error("foo")).pipe(
withSpan,
Effect.runPromise
);
});
it("fails with a normal error", async () => {
await Effect.fail("foo").pipe(
withSpan,
Effect.runPromise
);
});
it("fails with a normal error", async () => {
await Effect.fail(new Error("foo")).pipe(Effect.runPromise);
});
});