Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Sep 10, 2024
1 parent 9ce5e65 commit 1841b80
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/effect/test/Cause.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("Cause", () => {

describe("pretty", () => {
it("Empty", () => {
expect(Cause.pretty(Cause.empty)).toEqual("All fibers interrupted without errors.")
expect(Cause.pretty(Cause.empty)).toEqual("")
})

it("Fail", () => {
Expand Down Expand Up @@ -84,12 +84,12 @@ describe("Cause", () => {
})

it("Interrupt", () => {
expect(Cause.pretty(Cause.interrupt(FiberId.none))).toEqual("All fibers interrupted without errors.")
expect(Cause.pretty(Cause.interrupt(FiberId.none))).toEqual("InterruptedException: Fiber Interrupted")
expect(Cause.pretty(Cause.interrupt(FiberId.runtime(1, 0)))).toEqual(
"All fibers interrupted without errors."
"InterruptedException: Fiber Interrupted by: #1"
)
expect(Cause.pretty(Cause.interrupt(FiberId.composite(FiberId.none, FiberId.runtime(1, 0))))).toEqual(
"All fibers interrupted without errors."
"InterruptedException: Fiber Interrupted by: #1"
)
})
})
Expand Down Expand Up @@ -214,10 +214,10 @@ describe("Cause", () => {
})

it("Interrupt", () => {
expect(String(Cause.interrupt(FiberId.none))).toEqual(`All fibers interrupted without errors.`)
expect(String(Cause.interrupt(FiberId.runtime(1, 0)))).toEqual(`All fibers interrupted without errors.`)
expect(String(Cause.interrupt(FiberId.none))).toEqual(`InterruptedException: Fiber Interrupted`)
expect(String(Cause.interrupt(FiberId.runtime(1, 0)))).toEqual(`InterruptedException: Fiber Interrupted by: #1`)
expect(String(Cause.interrupt(FiberId.composite(FiberId.none, FiberId.runtime(1, 0))))).toEqual(
`All fibers interrupted without errors.`
`InterruptedException: Fiber Interrupted by: #1`
)
})

Expand Down

0 comments on commit 1841b80

Please sign in to comment.