question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Include only plain objects/arrays in t.true/t.false output of statements

See original GitHub issue

AVA’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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
pho3nixf1recommented, Mar 9, 2017

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.

0reactions
novemberborncommented, Sep 3, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found