From 727e0954fddd75a08baed0ef0866d70a769088a2 Mon Sep 17 00:00:00 2001 From: Mikaeel Date: Sun, 15 Jan 2023 01:48:20 +0330 Subject: [PATCH 1/2] Remove this.obj update in to.have.property function --- index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/index.js b/index.js index 04d8371..345a3ad 100644 --- a/index.js +++ b/index.js @@ -394,7 +394,6 @@ + ' of ' + i(val) }); } - this.obj = this.obj[name]; return this; }; From e919e420a73944123b7e94749efe3bd68e9bd829 Mon Sep 17 00:00:00 2001 From: Mikaeel Date: Sun, 15 Jan 2023 02:25:21 +0330 Subject: [PATCH 2/2] Add unit test for #81 --- test/expect.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/expect.js b/test/expect.js index 0185388..b91c2f5 100644 --- a/test/expect.js +++ b/test/expect.js @@ -570,4 +570,9 @@ describe('expect', function () { }, "explicit failure with message"); }); + it('should not fail with duplicate to.have.property assertions', function () { + var y = expect({ a : 1, b : 2 }); + y.to.have.property("a", 1); + y.to.have.property("b", 2); + }); });