MCPcopy Index your code
hub / github.com/Effect-TS/effect / expectError

Function expectError

packages/effect/test/Schema/JSONSchema.new.test.ts:30–32  ·  view source on GitHub ↗
(schema: Schema.Schema<A, I>, message: string)

Source from the content-addressed store, hash-verified

28const ajv2020 = new Ajv2020.default(baseAjvOptions)
29
30const expectError = <A, I>(schema: Schema.Schema<A, I>, message: string) => {
31 throws(() => JSONSchema.make(schema), new Error(message))
32}
33
34async function assertDraft7<A, I, R>(schema: Schema.Schema<A, I, R>, expected: object) {
35 const jsonSchema = JSONSchema.make(schema)

Callers 1

Calls 2

throwsFunction · 0.90
makeMethod · 0.65

Tested by

no test coverage detected