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; }; 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); + }); });