-
Notifications
You must be signed in to change notification settings - Fork 780
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core: Ensure inherited getters are not invoked by assert.deepEqual.
Previously, given the following: ```js class Foo { constructor(a = 1) { this.a = a; } } Object.defineProperty(Foo.prototype, 'b', { enumerable: true, get() { return new Foo(this.a + 1); } }) QUnit.test( "hello test", function( assert ) { assert.deepEqual(new Foo(), new Foo()); }); ``` The `assert.deepEqual` invocation would never complete (ultimately crashing the tab or node process). The changes here ensure that inherited descriptors (getter / setter _or_ value only) are compared without invoking the getter therefore preventing the issue mentioned above.
- Loading branch information
Showing
2 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters