( transformer: typeof JsonStringifyStream, chunks: unknown[], options: StringifyStreamOptions, // deno-lint-ignore no-explicit-any ErrorClass: new (...args: any[]) => Error, msgIncludes: string | undefined, )
| 19 | } |
| 20 | |
| 21 | async function assertInvalidStringify( |
| 22 | transformer: typeof JsonStringifyStream, |
| 23 | chunks: unknown[], |
| 24 | options: StringifyStreamOptions, |
| 25 | // deno-lint-ignore no-explicit-any |
| 26 | ErrorClass: new (...args: any[]) => Error, |
| 27 | msgIncludes: string | undefined, |
| 28 | ) { |
| 29 | const r = ReadableStream.from(chunks) |
| 30 | .pipeThrough(new transformer(options)); |
| 31 | await assertRejects( |
| 32 | async () => await Array.fromAsync(r), |
| 33 | ErrorClass, |
| 34 | msgIncludes, |
| 35 | ); |
| 36 | } |
| 37 | |
| 38 | Deno.test({ |
| 39 | name: "JsonStringifyStream", |
no test coverage detected