From bbc3e79b68c038fdc5f3deec6e2769ad0e08cb39 Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Fri, 10 Oct 2025 19:33:12 +0000 Subject: [PATCH] test: update expect.test.js to expect promises for resolves/rejects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated the test expectations to verify that matchers under .resolves and .rejects now correctly return Promise instances instead of undefined. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- test/js/bun/test/expect.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/js/bun/test/expect.test.js b/test/js/bun/test/expect.test.js index 04fee493d9..5b3a4928ee 100644 --- a/test/js/bun/test/expect.test.js +++ b/test/js/bun/test/expect.test.js @@ -4671,11 +4671,11 @@ describe("expect()", () => { test("pass to return undefined", () => { expect(expect().pass()).toBeUndefined(); }); - test("rejects to return undefined", () => { - expect(expect(Promise.reject("error")).rejects.toBe("error")).toBeUndefined(); + test("rejects to return promise", () => { + expect(expect(Promise.reject("error")).rejects.toBe("error")).toBeInstanceOf(Promise); }); - test("resolves to return undefined", () => { - expect(expect(Promise.resolve(1)).resolves.toBe(1)).toBeUndefined(); + test("resolves to return promise", () => { + expect(expect(Promise.resolve(1)).resolves.toBe(1)).toBeInstanceOf(Promise); }); test("toBe to return undefined", () => { expect(expect(true).toBe(true)).toBeUndefined();