mochajs / mocha Goto Github PK
View Code? Open in Web Editor NEW☕️ simple, flexible, fun javascript test framework for node.js & the browser
Home Page: https://mochajs.org
License: MIT License
☕️ simple, flexible, fun javascript test framework for node.js & the browser
Home Page: https://mochajs.org
License: MIT License
like spec.opts
make target
like visionmedia/expresso#127 something similar to this, but maybe just file based instead, or maybe we just leave this up to the user to separate them into different files
map hooks to these
shouldn't have two of the same, this makes it easier to meta-generate tests, nicer reporting etc
yellow / red etc
with whitelist etc
bugs me
to manually exit the process, kill connections etc
for cpu-bound tests
no point, just extra code
this way we could add a --concurrency <n>
flag and aggregate results
when loose equality is performed it's pretty annoying to see the difference between two arrays, two large objects etc
write a proper test cov lib
The testing for a Method to cause a error would be nice, some methods do raise errors/exceptions (validation for example), and testing for them could help avoid people writing boilerplate to simulate this.
ex:
var app;
describe('config', function(){
beforeEach(function(){
app = express();
})
describe('.set()', function(){
it('should set a value', function(){
app.set('foo', 'bar').should.equal(app);
})
})
describe('.get()', function(){
it('should get a value', function(){
//...
})
})
})
it would be cool to output some html that could be used as reference docs with blocks etc,
retaining the nesting you use in the tests
come up with an interface for TDD etc as well
with no-conflict or whatever
one in express is reporting as 20ms, however when moved below another that one is reported as 20ms haha...
few things breaking, and add more test cov
for the top of the site
output is getting munged quite a bit since node does not (currently) flush
add flag(s) to mocha(1), as well as interface functions to toggle the behaviour
Hank:admin deedubs$ ./node_modules/.bin/mocha
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Object # has no method 'getWindowSize'
at Object. (/Users/deedubs/Projects/admin/node_modules/mocha/lib/reporters/base.js:68:22)
at Module._compile (module.js:411:26)
at Object..js (module.js:417:10)
at Module.load (module.js:343:31)
at Function._load (module.js:302:12)
at require (module.js:355:19)
at Object. (/Users/deedubs/Projects/admin/node_modules/mocha/lib/reporters/index.js:2:16)
at Module._compile (module.js:411:26)
at Object..js (module.js:417:10)
at Module.load (module.js:343:31)
Hank:admin deedubs$ node -v
v0.4.12
"some error in setup hook" etc
make sure not to use things that I normally do like forEach :D
nesting blah blah
setup / teardown for TDD interface etc
this would work into tagging as well
http://d.pr/nIeW
is not overly useful haha
make a website sometime
add thresholds and do this for a few of the reporters so that slow tests stand out
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.