Skip to content

Commit

Permalink
fix some tests using old assert
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart authored and effect-bot committed Feb 1, 2025
1 parent 6140c43 commit 05ce352
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
5 changes: 3 additions & 2 deletions packages/effect/test/Effect/filtering.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as Either from "effect/Either"
import { pipe } from "effect/Function"
import * as Ref from "effect/Ref"
import { assertLeft, assertRight, deepStrictEqual } from "effect/test/util"
import { strictEqual } from "node:assert"

const exactlyOnce = <R, A, A1>(
value: A,
Expand Down Expand Up @@ -218,7 +219,7 @@ describe("Effect", () => {
orElse: () => Effect.succeed(0)
})
)
assert.strictEqual(result, 0)
strictEqual(result, 0)
}))
})

Expand All @@ -232,7 +233,7 @@ describe("Effect", () => {
}),
Effect.flip
)
assert.strictEqual(result, "boom")
strictEqual(result, "boom")
}))
})
})
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { assert, describe, it } from "@effect/vitest"
import * as Effect from "effect/Effect"
import * as Option from "effect/Option"
import * as it from "effect/test/utils/extend"
import { assert, describe } from "vitest"

describe("Effect", () => {
describe("transposeOption", () => {
Expand Down
14 changes: 7 additions & 7 deletions packages/effect/test/RcMap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@ describe("RcMap", () => {
idleTimeToLive: 1000
})

assert.deepStrictEqual(acquired, [])
assert.strictEqual(yield* Effect.scoped(RcMap.get(map, "foo")), "foo")
assert.deepStrictEqual(acquired, ["foo"])
assert.deepStrictEqual(released, [])
deepStrictEqual(acquired, [])
strictEqual(yield* Effect.scoped(RcMap.get(map, "foo")), "foo")
deepStrictEqual(acquired, ["foo"])
deepStrictEqual(released, [])

yield* TestClock.adjust(500)
assert.deepStrictEqual(released, [])
deepStrictEqual(released, [])

yield* RcMap.touch(map, "foo")
yield* TestClock.adjust(500)
assert.deepStrictEqual(released, [])
deepStrictEqual(released, [])
yield* TestClock.adjust(500)
assert.deepStrictEqual(released, ["foo"])
deepStrictEqual(released, ["foo"])
}))

it.scoped("capacity", () =>
Expand Down

0 comments on commit 05ce352

Please sign in to comment.