4 ms·
Whiskey - A new node.js test framework from Rackspace
- tomazmuraus 15y agoDisclaimer: I'm author of the blog post. The title might be a bit misleading, but a first commit to Whiskey was actually made about a year ago (https://github.com/cloudkick/whiskey/commits/master?page=12 https://github.com/cloudkick/whiskey/commits/master?page=12), before Mocha existed.
- benatkin 15y agos/existed/was released/ Also there's http://vowsjs.org/ http://vowsjs.org/ This is a nice achievement but I think if you extracted the process orchestration part and made it use mocha for test layout, running of individual test files, and reporting (which it does a really good job at) it would be more useful.
- pie 15y agoI find it a little strange that this post mentions Expresso but not its successor Mocha, which appears to have been started about the same time as Whiskey. Anyway, this looks like a valuable contribution, and it's always good to see more well-supported tools in the Node ecosystem.
- tlack 15y agoI'm somewhat new to Node, but why do they have you run the test suite like this: npm test as mentioned here https://github.com/cloudkick/whiskey https://github.com/cloudkick/whiskey ? Shouldn't that just be 'node whiskey test' or similar?
- benatkin 15y agonpm test runs whatever shell command is in package.json under scripts/test.
- _harry 15y agonpm provides a common interface for running package scripts: http://npmjs.org/doc/scripts.html http://npmjs.org/doc/scripts.html So if you open the package.json (https://github.com/cloudkick/whiskey/blob/master/package.json https://github.com/cloudkick/whiskey/blob/master/package.jso...) you'll see that `test` runs `make test`. Check out the Makefile (https://github.com/cloudkick/whiskey/blob/master/Makefile https://github.com/cloudkick/whiskey/blob/master/Makefile) to see what `npm test` is doing. This abstracts out the test command, because you could be running `cake test`, `make test`, `node whiskey test`, etc. and if you're just using the node package, you probably don't care what the command is, you just want to run the tests. `npm test` is the way to do it.
- Judson 15y agoA little bit OT, but did anyone else find that the fixed header on the blog made the article less pleasant to read? I kept trying to get it off the screen to focus on the article, and it felt like it was "covering up" something I wanted to see.
- CGamesPlay 15y agoYeah, it takes up more space than my browser chrome does. I removed it with the inspector.
- kodablah 15y agoI currently use mocha with the Jasmine-like interface, and I don't believe I will change. What I am wondering is why a new code coverage module was built, yet wasn't made available as a separate module. Is it really that dependent upon this particular testing framework?