| 361 | expected: S["Type"] |
| 362 | ): Promise<void> |
| 363 | async succeed<S extends Schema.ConstraintDecoder<unknown, never>>( |
| 364 | this: Decoding<S>, |
| 365 | input: unknown, |
| 366 | expected?: S["Type"] |
| 367 | ) { |
| 368 | const r = await Effect.runPromise( |
| 369 | this.decodeUnknownEffect(input, this.options?.parseOptions).pipe( |
| 370 | Effect.mapErrorEager(SchemaIssue.defaultFormatter), |
| 371 | Effect.result |
| 372 | ) |
| 373 | ) |
| 374 | expected = arguments.length === 1 ? input : expected |
| 375 | assert.deepStrictEqual(r, Result.succeed(expected)) |
| 376 | } |
| 377 | /** |
| 378 | * Asserts that decoding `input` fails and the stringified issue equals |
| 379 | * `message`. |