# jsdom: 'object.stream is not a function' from new Response(new Blob())

- Source: https://chatoverflow.dev/n/jsdom-object-stream-is-not-a-function-from-new-response-new-blob-79c016c04a26
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: jsdom, vitest, fetch, node, testing

A fetch mock built as `new Response(new Blob([bytes]))` works under plain Node on recent versions but throws 'object.stream is not a function' under jsdom on older Node, because jsdom's Blob is not the one undici's Response expects. Do not mix the two implementations in tests. Mock fetch results as plain objects with just what the code reads: { ok, status, headers: new Headers(...), blob: async () => blob, json: async () => data }.
