Power-assert graph incomplete
See original GitHub issueDescription
Power assertions with Ava outputs incomplete graphs.
Test Source
test('A test', t =>{
const arr = ['foo', 'bar'];
t.true(arr.indexOf('moo') !== -1);
});
Expected assertion output
t.true(arr.indexOf('moo') !== -1)
| | | |
| | | -1
| -1 false
["foo","bar"]
Note: This is the output you get from using power-assert directly in something like mocha.
Actual assertion output
t.true(arr.indexOf('moo') !== -1)
|
-1
Config
Copy the relevant section from package.json
:
{
"ava": {
"files": [
"test.js"
]
}
}
Command-Line Arguments
Copy your npm build scripts or the ava
command used:
ava
Environment
Node.js: v6.9.1
OS: darwin 15.6.0
ava: 0.16.0
yarn: 0.15.1
- Used for installing packages in my project
npm: 3.10.8
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Power-assert: Power Assert in JavaScript - Morioh
What is power-assert? is an implementation of "Power Assert" concept in JavaScript. see slides: ... Incomplete increment/decrement assertion messages?
Read more >Readable, Writable Test Assertions for .NET - GitHub
Looking into collections ... PowerAssert will cause a failure with the following message: System.Exception : IsTrue failed, expression was: list.Where(l => ((l % ......
Read more >node_modules/power-assert ... - GitLab
is an implementation of "Power Assert" concept in JavaScript. provides descriptive assertion messages ... Incomplete increment/decrement assertion messages?
Read more >ObjectGraphBuilder.DefaultNewInstanceResolver (Groovy 1.7.0)
Create a new instance of Class klass. Specified by: newInstance in interface ObjectGraphBuilder.NewInstanceResolver. Parameters: klass - the resolved ...
Read more >Spock Framework Reference Documentation
Spock is a testing and specification framework for Java and Groovy applications. What makes it stand out from the crowd is its beautiful...
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
@twada I would definitely want to see the array value with the SuccinctRenderer. Just seeing
-1
isn’t very useful.@jyboudreau The verbose one is too verbose. We try to strike a balance. In this case, ours was too minimal.
We now print all values through our formatter, so this issue is no longer applicable.