* Ensures that the given constructor produces the expected value.
(
// Destructure to verify that "this" type is bound
{ make }: { readonly make: (a: A) => B },
input: A,
expected?: B
)
| 65 | * Ensures that the given constructor produces the expected value. |
| 66 | */ |
| 67 | succeed<const A, const B>( |
| 68 | // Destructure to verify that "this" type is bound |
| 69 | { make }: { readonly make: (a: A) => B }, |
| 70 | input: A, |
| 71 | expected?: B |
| 72 | ) { |
| 73 | deepStrictEqual(make(input), expected ?? input) |
| 74 | }, |
| 75 | |
| 76 | /** |
| 77 | * Ensures that the given constructor throws the expected error. |
nothing calls this directly
no test coverage detected