Open
Description
I recently moved some code that had Object.assign(Object.create(null), { prop1: 1 })
to just properties on the class, where the class holds this.props1 = 1
. Then the assertions started failing.
expect(postDataStub).to.be.calledOnceWith(dataObject);
If I do a Object.setPrototypeOf(objInstantiatedFromClass, null)
then tests pass again. The real test has nested properties. I just wanted to see if I can somehow get away by telling sinon to ignore prototype methods.
Metadata
Metadata
Assignees
Labels
No labels