Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jun 28, 2022
1 parent 36f3dbb commit 1ef7340
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/kit/test/typings/endpoint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ export const readable_stream_body: RequestHandler = () => {
};
};

// valid - body instance of stream.Readable should be allowed
export const stream_readable_body: RequestHandler = async () => {
const { Readable } = await import('stream');
return {
body: new Readable()
};
};

// valid - different header pairs should be allowed
export const differential_headers_assignment: RequestHandler = () => {
if (Math.random() < 0.5) {
Expand Down Expand Up @@ -193,3 +185,11 @@ export const error_nested_instances: RequestHandler = () => {
body: { typed: new Uint8Array() }
};
};

// @ts-expect-error - instances cannot be nested
export const stream_readable_body: RequestHandler = async () => {
const { Readable } = await import('stream');
return {
body: new Readable()
};
};

0 comments on commit 1ef7340

Please sign in to comment.