Commit 54aad99
Robert Jackson
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.1 parent 112d782 commit 54aad99
2 files changed
+59
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
16 | 41 | | |
17 | 42 | | |
18 | 43 | | |
| |||
265 | 290 | | |
266 | 291 | | |
267 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
268 | 296 | | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
274 | 312 | | |
275 | 313 | | |
276 | 314 | | |
277 | 315 | | |
| 316 | + | |
278 | 317 | | |
279 | 318 | | |
280 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1664 | 1664 | | |
1665 | 1665 | | |
1666 | 1666 | | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
1667 | 1682 | | |
1668 | 1683 | | |
1669 | 1684 | | |
| |||
0 commit comments