-
-
Notifications
You must be signed in to change notification settings - Fork 750
Open
Labels
Description
Please avoid duplicates
- I checked all open bugs and none of them matched my problem.
Reproducible test case
import nock from "npm:[email protected]";
nock("http://example.com")
.get("/")
.reply(200, "Hello World!");
const response = await fetch("http://example.com");
console.log({ body: await response.text() });
$ deno install --entrypoint main.js
$ deno --allow-env main.js
{ body: "" }
Nock Version
14.0.1
Node Version
$ deno --version
deno 2.1.9 (stable, release, aarch64-apple-darwin)
v8 13.0.245.12-rusty
typescript 5.6.2
TypeScript Version
Not using typescript.
What happened?
When using Nock with Deno, the response body is empty despite the mocked response specifying a body.
This issue seems specific to using Nock with Deno. The same code works as expected in a Node.js environment.
Would you be interested in contributing a fix?
- yes