Skip to content

Commit

Permalink
remove test for sandbox.replace
Browse files Browse the repository at this point in the history
never supported undefined or protypal props in the first place.
See #2195 for backing discussion on creating sinon.define()
  • Loading branch information
fatso83 committed Apr 20, 2023
1 parent 0a8b32d commit aa9662b
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions test/issues/issues-test.js
Expand Up @@ -874,17 +874,5 @@ describe("issues", function () {
mock.expects("aMethod").once();
});
});

it("should not throw if the unconfigurable object descriptor to be used for a Fake is on the prototype", function () {
const instance =
createInstanceFromClassWithReadOnlyPropertyDescriptor();

// per #2491 this throws "TypeError: Cannot assign to read only property 'aMethod' of object '#<BaseClass>'"
// that makes sense for descriptors taken from the object, but not its prototype, as we are free to change
// the latter when setting it
refute.exception(() => {
this.sandbox.replace(instance, "aMethod", sinon.fake());
});
});
});
});

0 comments on commit aa9662b

Please sign in to comment.