bartvds / mocha-unfunk-reporter Goto Github PK
View Code? Open in Web Editor NEWMocha reporter without console funkyness
License: MIT License
Mocha reporter without console funkyness
License: MIT License
For longer texts it could be nice to skip leading/trailing identical parts that clutter the view.
Use gruntfile-gtx
to get rid of repeating elements.
Do not left-trim the stack-trace:
For example: when using for Q.longStackSupport promises the From previous event:
-line should be on different indent level then the at
's:
at Function.assert.jsonOf (index.js:105:40)
From previous event:
at Context.<anonymous> (API.ts:101:7)
Should be doable without colors with a multi-line format:
Hello world today
||||||-------|||||++++++
Hello lovely world
Would be nice to have a list of active filters, both in code as well as in the documentation.
For clarity
Hi,
I am adding mocha to the index.html page. and include test scripts to that page..
and use mocha or mocha-phantomjs to run the test by giving index.html as input.
Can you please let me know how to include your reporter in this kind of setup.
I added the unfunk.js to the html page --- complained about requirejs
Added requireJS to the htmlpage -- error : Module name "jsesc" has not been loaded yet for context: _. Use require([])
jsesc is in the nodemodules folder.
Girish
you currently have
grit://github.com/Bartvds/mocha-unfunk-reporter.git (git)
use the http address
https://github.com/Bartvds/mocha-unfunk-reporter.git
Setting options through process.env['mocha-unfunk-<option_name>']
is very unpractical, since environment variables in bash can only contain letters, numbers and underscores. Dashes are not allowed.
I would change it to MOCHA_UNFUNK_STYLE
for example.
Seriously, it is a huge mess out there.
Consider dropping support for everything that is not on the level with Chai.
Or write a use-activated compatibility layer that can restore some of the dmaaged assertion errors.
Chai, Proclaim, Must, Expect, Should, CommonJS/Node.
Use grunt-run-grunt
to process and verify the console output.
And ministyle of course.
AssertionErrors from Chai looks good but output from commonjs standard assert's and modules like proclaim need some tuning.
The message / stack code is ugly hacked copy from base reporter, needs a clean rewrite.
Keep console from exploding when comparing long strings.
Update grunt-mocha note (as my fix is merged)
Update screenshots (with string/objects diff demo)
Bail is for easy debugging. Why clutter the view?
$ mocha --reporter mocha-unfunk-reporter --reporter-options foo=bar
constructor
will get args runner
and options
object, which contains a reporterOptions
hash.
constructor(runner, options) {
console.log(options.reporterOptions);
}
// => { foo: 'bar' }
Will start working on implementing this, but wanted to track it here. ๐
Filter from both sides in.
Separately configurable because 'top' is important for debugging custom assertion stuff.
Careful with promises and other odd constructs (chai-as-promised
/ mocha-as-promised
)
Hey Gang
Is there a method for integrating this reporter with Karma?
Use the demo test and local browser: seems to work nicely. How?
Maybe same thing will work on Node.js too, would be nice.
Seems doable to highlight lines in the stack trace.
Add a submodule or config mode for compacter display of passing tests.
Similar to the default 'Dot' reporter
Per-char gives less usable results, like this dangling 'e':
My Message: actual-value: expected 'test/fixtures/non-existing.txt'
||||||||||||-----------|---||||||||||||||||||||||||||||||||||||||||
My Message: e xpected 'test/fixtures/non-existing.txt'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.