We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b26094 commit ea4cba2Copy full SHA for ea4cba2
packages/effect/dtslint/Schema/Brand.tst.ts
@@ -1,6 +1,6 @@
1
/* eslint-disable @typescript-eslint/no-unused-vars */
2
import { pipe, Schema } from "effect"
3
-import { describe, expect, it } from "tstyche"
+import { describe, expect, it, when } from "tstyche"
4
5
const Int1 = Symbol.for("Int")
6
const Int2 = Symbol.for("Int")
@@ -16,4 +16,13 @@ describe("SchemaBrand", () => {
16
expect<A1>().type.not.toBeAssignableTo<A2>()
17
expect<A2>().type.not.toBeAssignableTo<A1>()
18
})
19
+
20
+ it("should raise an error when the brand is not assignable to the schema", () => {
21
+ when(pipe).isCalledWith(
22
+ Schema.Number,
23
+ expect(Schema.brand).type.not.toBeCallableWith("UserId", {
24
+ examples: ["a"]
25
+ })
26
+ )
27
28
0 commit comments