MCPcopy Index your code
hub / github.com/cameri/nostream / expectStreamToFail

Function expectStreamToFail

test/unit/utils/compression.spec.ts:40–47  ·  view source on GitHub ↗
(stream: NodeJS.ReadableStream)

Source from the content-addressed store, hash-verified

38}
39
40const expectStreamToFail = async (stream: NodeJS.ReadableStream): Promise<void> => {
41 try {
42 await toBuffer(stream)
43 expect.fail('Expected stream to fail')
44 } catch (error) {
45 expect(error).to.be.instanceOf(Error)
46 }
47}
48
49describe('compression utils', () => {
50 const xzAvailable = hasLzmaNative()

Callers 1

Calls 1

toBufferFunction · 0.70

Tested by

no test coverage detected