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
**Important**: When destructuring assertion methods from an `Assert` instance, the methods lose their connection to the instance's configuration options (such as `diff` and `strict` settings). The destructured methods will behave with default options instead.
246
+
247
+
```js
248
+
constmyAssert=newAssert({ diff:'full' });
249
+
250
+
// This works as expected - uses 'full' diff
251
+
myAssert.strictEqual({ a:1 }, { b: { c:1 } });
252
+
253
+
// This loses the 'full' diff setting - uses default 'simple' diff
254
+
const { strictEqual } = myAssert;
255
+
strictEqual({ a:1 }, { b: { c:1 } });
256
+
```
257
+
258
+
To maintain custom options when using destructured methods, pass the options to individual assertion calls or avoid destructuring.
0 commit comments