Comments (8)
https://github.com/sinonjs/referee-custom-assert-with-mocha
from referee.
I was wondering the same thing today. While your suggestion is fine for node, how about browser support?
Maybe this can even be achieved without changing anything. E.g. with Mocha your can require additional modules:
mocha -r ./path/to/assertions -r morgan-assertions
When using something browserify based this can also be done the same way.
from referee.
How would that work in browsers?
Should the plugins export things into the global scope, that can be detected by referee
when it is loaded?
from referee.
The plugins can simply require('referee').add(...)
as before.
from referee.
I am a bit slow today, would that make the config file obsolete?
from referee.
Yes. You'd essentially pass the file paths to require to the test runner instead.
from referee.
I think we'll need to create a running example of how this would work. Perhaps this can be the foundation of a how-to article about using custom assertions with referee
.
from referee.
👍 That's awesome, I've stolen your work for the docs 😁
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.