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
Because the spy calls the original method with `.apply(this, args)`, `this` is preserved. This lets you spy on a shared prototype method to detect that an instance method was used without knowing the variable's name. For example, to check that `.push()` was called on an array:
Returns an `Explorer` instance representing the assigned value of a variable, property, parameter, or property assignment. Returns an empty `Explorer` if there is no initializer.
676
690
677
691
```js
678
-
constexplorer=await__helpers.Explorer('const a = 1; const b = { x: 10 };');
679
-
const { a, b } =explorer.variables;
692
+
constexplorer=await__helpers.Explorer(
693
+
'const a = 1; const b = { x: 10 }; const c = a + 1;'
0 commit comments