You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2020. It is now read-only.
In future version i would like to stop changing this.obj in assertions like .key or .property. I would like this assertion to save this plural object in addtional property, and if .which is called it will restore it. Examples:
Current behaviour:
({a: 42}).should.have.key('a').and.be.Number();
As .key changed current object to be 42 (value of key 'a'), we can chain with a Number assertion.
Proposed change:
({a: 1,b: 2}).should.have.key('a').and.key('b');// this time given object is not changed, but({a: 1,b: 'a'}).should.have.key('b').which.is.a.String();// .which restore last object from .keys to use in next assertions