One of my objects has a .inspect function that collides with chai/loupe's customInspect setting.
The options provided to loupe's inspect are hardcoded (which is why I'm opening the issue here rather than in loupe):
|
let options = { |
|
colors: colors, |
|
depth: typeof depth === 'undefined' ? 2 : depth, |
|
showHidden: showHidden, |
|
truncate: config.truncateThreshold ? config.truncateThreshold : Infinity |
|
}; |
Setting customInspect: false below would disable the check.
https://github.com/chaijs/loupe/blob/b5b084b8429a3ad2ed4e8abfab2e3cdef92ba6e2/src/index.ts#L99-L101
There's already an issue over there questioning the validity of using a string-keyd 'inspect' function given that there is support for Symbols widely available chaijs/loupe#74, but it seems to have been missed by the maintainers of the repo.
https://github.com/chaijs/loupe/blob/b5b084b8429a3ad2ed4e8abfab2e3cdef92ba6e2/src/index.ts#L28-L30
One of my objects has a
.inspectfunction that collides withchai/loupe'scustomInspectsetting.The options provided to loupe's
inspectare hardcoded (which is why I'm opening the issue here rather than in loupe):chai/lib/chai/utils/inspect.js
Lines 24 to 29 in 0b0353c
Setting
customInspect: falsebelow would disable the check.https://github.com/chaijs/loupe/blob/b5b084b8429a3ad2ed4e8abfab2e3cdef92ba6e2/src/index.ts#L99-L101
There's already an issue over there questioning the validity of using a string-keyd
'inspect'function given that there is support for Symbols widely available chaijs/loupe#74, but it seems to have been missed by the maintainers of the repo.https://github.com/chaijs/loupe/blob/b5b084b8429a3ad2ed4e8abfab2e3cdef92ba6e2/src/index.ts#L28-L30