Include only plain objects/arrays in t.true/t.false output of statements
See original GitHub issueAVA’s magic-assert output causes a crash when this kind of assertion fails:
t.true(some.spy.calledOnce);
or similar, when functions/instances are involved. This is happening, because @ava/pretty-print
tries to print some.spy
and some
nicely. When parsing statements in lib/enhance-assert
, we should ignore anything but plain objects and arrays.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:12 (11 by maintainers)
Top Results From Across the Web
DataWeave Output Formats and Writer Properties
DataWeave supports these formats (or mime types) as input and output: ... true. defines if the Excel tables contain headers. When set to...
Read more >How can I access and process nested objects, arrays, or JSON?
I'm trying to access a property but I get only undefined back? Most of the time when you are getting undefined , the...
Read more >JSON methods, toJSON - The Modern JavaScript Tutorial
Let's say we have a complex object, and we'd like to convert it into a string, ... strings,; numbers,; boolean values true/false ,;...
Read more >CREATE FILE FORMAT - Snowflake Documentation
Any plain text file consisting of one or more JSON documents (objects, ... When unloading table data to files, Snowflake outputs only to...
Read more >Iterating over jQuery and non-jQuery Objects
Notice that we don't have to access arr[ index ] as the value is conveniently passed to ... Note that $.each() is for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This same behavior happens when using
enzyme
wrappers. The output is so large it makes the test output useless. I’ve gotten into the habit of putting the exact test value into a variable before passing it to the ava assertion.The immediate problems are covered by #1204 and #1205. Beyond that we need to (eventually) support custom formatters for libraries like Sinon and Enzyme, but there’s no point keeping this issue open for that.