Closed tnrich closed 8 years ago
Hi @tnrich!
What reporters are you using, which version of mocha, chai?
what i see from console with spec
reporter when i'm failing one of the tests in this modules with modules that are mentioned in this module for test
, So i see actual error
Other possible solution that i use in my daily life is WebStorm IDE with mocha test runner
So i can click on "Click to see the difference to see difference" and it will use diff comparison to show you what and where is wrong in your long object.
So what would i suggest you:
npm test
to check` that tests are green in initial state)chai-subset
failnpm test
again to see detailed diff of expected and actual objectsHey @eagleeye, thanks for the advice! Cloning this repo and running the failing test did output correctly to my console. I haven't quite figured out what is different between our test setups. One thing it might be is that I'm using babel to compile es6 code before running them.. Not sure if that is it though. I'll tell you if/when I get it.
Update:
It's no wonder I was getting a strange error.
I was calling should.should by accident.
If you look above
sequenceData.features.should.***should***.containSubset([{
start: 0,
end: 2
}, {
start: 1,
end: 1
}])
Hey there, I'm running this test:
Which is failing with this error:
Any idea how I can get it to throw a more descriptive error. I was hoping I would be able to see what those two objects actually were...
Thanks!