diff options
author | 2023-05-22 19:44:21 -0700 | |
---|---|---|
committer | 2023-05-22 19:44:21 -0700 | |
commit | 5cfa5edd63968582dddf64f4e7087d33c8d36cb7 (patch) | |
tree | 7f0d79af73aa646f802d801b44a0173812ce4e22 /test/js/node/http/node-http.test.ts | |
parent | fc40c690ea30a632a8d0d9490321c50ec898d8a5 (diff) | |
download | bun-5cfa5edd63968582dddf64f4e7087d33c8d36cb7.tar.gz bun-5cfa5edd63968582dddf64f4e7087d33c8d36cb7.tar.zst bun-5cfa5edd63968582dddf64f4e7087d33c8d36cb7.zip |
[node:http] Fix return type for `getHeader()` (#3007)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'test/js/node/http/node-http.test.ts')
-rw-r--r-- | test/js/node/http/node-http.test.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/js/node/http/node-http.test.ts b/test/js/node/http/node-http.test.ts index 726453217..b1910a1f7 100644 --- a/test/js/node/http/node-http.test.ts +++ b/test/js/node/http/node-http.test.ts @@ -398,8 +398,11 @@ describe("node:http", () => { }); res.on("error", err => done(err)); }); - req.end(); expect(req.getHeader("X-Test")).toBe("test"); + // node returns undefined + // Headers returns null + expect(req.getHeader("X-Not-Exists")).toBe(undefined); + req.end(); }); }); |