Comments (6)
This is important because many tests assert the difference between +0
/-0
. We should update Chai to reflect this change.
from loupe.
And one more question, it seems custom functions don't work, or I have to pass some parameters?
5) utilities
inspect with custom stylize-calling inspect()s:
AssertionError: expected '{ outer: { inspect: [Function inspect] } }' to equal '{ outer: Object content }'
+ expected - actual
-{ outer: { inspect: [Function inspect] } }
+{ outer: Object content }
from loupe.
This is a change in the loupe
API to avoid surprising behaviours for calls that have an inspect
that gets called when it is not desirable. The behaviour is opt in now, so you need to pass customInspect: true
, e.g loupe(obj, { customInspect: true })
. We can do that inside Chai to avoid breaking change, and turn it off in Chai 5.
from loupe.
I tried to pass this parameter, but it seems the execution does not reach this line:
Line 142 in 0c75417
so the result is the same.
from loupe.
Ahh yeah its because of this above:
Lines 129 to 133 in 0c75417
We should verify this behaviour works well in Loupe and release a patch. The block I linked above should add !customInspect &&
as an extra conditional, IMO.
from loupe.
🎉 This issue has been resolved in version 2.0.2 🎉
The release is available on:
Your semantic-release bot 📦🚀
from loupe.
Related Issues (20)
- TODO for v2 Release HOT 4
- Time representation difference in Chai.js HOT 6
- Loupe doesn't work correctly for buffers HOT 2
- `inspect( 1n )` => no joy HOT 2
- broken dependency `get-function-name` HOT 2
- Handle circular references HOT 1
- Quote complex keys in objects HOT 1
- The automated release is failing 🚨 HOT 1
- IE9+ not supported since 4.3.5 because of loupe HOT 4
- inspect of Object with null prototype causes primitive value error
- Invalid Date object will throw a TypeError HOT 5
- add an option to render functions as their body HOT 5
- Package `loupe` seems to be an ES Module but shipped in a CommonJS package HOT 1
- `depth` option HOT 1
- vulnerability in loupe HOT 1
- New release for Dependabot Fix? HOT 1
- prevent `playwright` installation HOT 2
- Is the custom `inspect()` still needed?
- Handle circular references better HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loupe.