Comments (3)
With #35 merged and published, I think this is significantly improved. I think we can close this
from referee.
I started looking into diff output, mainly because referee is not showing a very helpful error message when assert.equals
fails on comparing two objects.
It seems like most test framewoks have a useful implementation for this based on expected
and actual
properties exposed on thrown errors. This is the way the Node assert
module creates errors and maybe referee should do the same.
It makes sense to leave this to the test runner because there users can turn the behavior on or off and it might depend on the reporter in use to which level of detail and in which format the diff can be rendered (think console vs html vs json).
This would make the multilineStringDiff
implementation entirely superfluous and also give us object diffs in a supporting framework.
I ran some quick checks with Mocha and it's relatively easy to make the change.
@mroderick What do you think?
from referee.
I like the idea of leaving it up to the test runner, as people will like things to be as homogenous in their chosen environments.
from referee.
Related Issues (20)
- Does not handle objects without prototype HOT 2
- Missing a changelog? HOT 5
- Bundle does not works in browser due to missing externals HOT 4
- Experiment: replace `@sinonjs/formatio` with Node's `util.inspect`
- Documentation and assert.equals error message still reference deprecated (removed) defined assertion HOT 4
- Add `.addWithExpectation`
- Rename resolves and rejects assertions HOT 1
- assert.match passes for unknown properties if the value is undefined
- No default jsDelivr CDN file set HOT 1
- Naming nit HOT 4
- Allow assert.rejects to take only one argument HOT 4
- referee.exception doesn't test for exact match of exception properties HOT 1
- Feature: assert.resolves and assert.rejects HOT 6
- Feature: Unify comparison logic with matcher support in Sinon projects HOT 18
- Proposal: remove referee.count HOT 11
- Feature: expand verify to ensure no async assertions are pending HOT 4
- Unexpected matching logic HOT 6
- Edge case: isBoolean vs. new Boolean() HOT 2
- Introduce isUndefined and deprecate defined
- Suggestion: Move DOM related assertions into separate module HOT 6
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 referee.