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
Similar to `t.capture()``, but can be used to track get/set operations for any arbitrary property.
426
+
Calling the returned `results()` function will return an array of call result objects.
427
+
The array of calls will be reset whenever the function is called.
428
+
Call result objects will match one of these forms:
429
+
-`{ type: 'get', value: '1.2.3', success: true, args: [x, y, z], receiver: o }`
430
+
-`{ type: 'set', value: '2.4.6', success: false, args: [x, y, z], receiver: o }`
431
+
432
+
If `strictMode` is `true`, and `writable` is `false`, and no `get` or `set` is provided, an exception will be thrown when `obj[property]` is assigned to.
433
+
If `strictMode` is `false` in this scenario, nothing will be set, but the attempt will still be logged.
434
+
435
+
Providing both `desc.get` and `desc.set` are optional and can still be useful for logging get/set attempts.
436
+
437
+
`desc` must be a valid property descriptor, meaning that `get`/`set` are mutually exclusive with `writable`/`value`.
438
+
Additionally, explicitly setting `configurable` to `false` is not permitted, so that the property can be restored.
439
+
423
440
## var htest = test.createHarness()
424
441
425
442
Create a new test harness instance, which is a function like `test()`, but with a new pending stack and test state.
0 commit comments