* Creates a schema that always fails validation.
(errorMessage: string)
| 76 | * Creates a schema that always fails validation. |
| 77 | */ |
| 78 | function makeFailingType(errorMessage: string): StandardSchemaV1<unknown> { |
| 79 | return { |
| 80 | "~standard": { |
| 81 | version: 1, |
| 82 | vendor: "test", |
| 83 | validate: () => { |
| 84 | return { |
| 85 | issues: [{ message: errorMessage }], |
| 86 | }; |
| 87 | }, |
| 88 | }, |
| 89 | }; |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * Creates a schema that returns a Promise (async validation - not supported). |
no outgoing calls
no test coverage detected