Comments (4)
leave this up to the assertion lib
from mocha.
I would like to hook up NV/objectDiff.js to mocha. How can I do it? It isn't clear at all.
In Jasmine I used to do the following for a browser reporter:
beforeEach(function() {
this.addMatchers({
toEqualOwnProperties: function(expected) {
var diff = objectDiff.diffOwnProperties(expected, this.actual);
this.message = function() {
var pre = document.createElement('pre');
pre.innerHTML = objectDiff.convertToXMLString(diff);
return [pre];
};
return diff.changed === 'equal';
}
});
});
from mocha.
mocha doesn't ship with an assertion lib so it's really up to you/that lib. I do want to support a couple "special" properties on the error objects to make specialized formatting easier
from mocha.
Yeah, would be nice to have one for HTML and one for a shell.
from mocha.
Related Issues (20)
- 🐛 Bug: Eleventy template builds crash with 'unexpected token at ": string, msg..."' HOT 1
- 🐛 Bug: mocha does not compatible with node.js test runner HOT 1
- 📝 Docs: Remove Matomo from the website HOT 1
- 🐛 Bug: Failed to run tests with a large tests count HOT 1
- 🛠 Repo: Tests broken on main for xunit after conflicting merge
- 🛠 Repo: Remove `husky` for now HOT 3
- 🛠 Repo: Replace `nps` with ordinary npm scripts
- 🐛 Bug: Audit and fix accessibility for browser reporter
- 🚀 Feature: Unify `--ignore` and `--watch-ignore` and make the patterns recursive HOT 1
- 🐛 Bug: Unit test cases taking too much time to execute HOT 1
- 🐛 Bug: <short description of the bug>
- 🐛 Bug: `skip` shows "pending" instead of "skipped" HOT 2
- 🐛 Bug: Test titles not shown for ES dynamic imports HOT 1
- 🐛 Bug: mocha fails silently on invalid `package.json` section HOT 1
- Bump chokidar HOT 3
- 🐛 Bug: [email protected] has a performance bug HOT 1
- 🐛 Bug: Error Importing TypeScript Class: Only .js Extension Supported, Not .ts HOT 1
- 🐛 Bug: when using exports interface for tests, there's no file on suites objects HOT 8
- 🚀 Feature: Update glob from 8.1.0 which is no longer supported HOT 6
- 🐛 Bug: Watch + mochaHooks inconsistent state on re-runs HOT 2
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 mocha.