nodeunit
nodeunit copied to clipboard
Easy unit testing in node.js and the browser, based on the assert module.
test.js (there's no smaller repro than this!): ``` javascript exports.duplicateDoneBreaksNodeUnit = function(test) { test.done(); test.done(); }; ``` output: ``` [1m[32mOK: [39m[22m0 assertions (105ms) ...\project\node_modules\nodeunit\lib\core.js:284 if (group.setUp) { ^ TypeError: Cannot...
This fixes the the problem where asynchronously thrown exceptions within tests are not caught or logged. This problem is actually specific to node v0.10 Credit for the fix goes to...
Added new reporter `better_skip_passed` based on `skip_passed`, with a more concise and colorful formatting.  Signed-off-by: Bernard `Guyzmo` Pratz
Fix a bug that is happen when nodeunit try to test a file by the absolute path. `path.join(process.cwd(), filename)` is a code in some reporters does not work when the...
looked into the stack trace issue, and what I think is that only filename and line number of entry two in the general stack trace are relevant to show
We have a test directory including many folders that follow the same naming pattern. So each folder contains an indexTest.js. When running nodeunit on the complete directory with the junit...
Steps to reproduce: 1. Go into the examples/browser folder 2. Open test.html 3. Everything works as expected 4. Add setUp and tearDown functions to suite1.js 5. Refresh the page to...
Here is my test (using grunt-contrib-nodeunit): ``` var requirejs = require('requirejs'); exports.test = function(test){ test.expect(1); requirejs(['dist/test-hts'],function(obj){ test.ok(true, 'hello'); test.done(); }); }; ``` For some reason, this doesn't work! It appears...
Hi, I am using node unit and I defined custom error types in this fashion : ``` var errors = {} errors.UnknownAttributeError = function(message) { this.name = "UnknownAttributeError"; this.message =...
Unless I am doing something incorrectly, the documentation is incorrect about `runTest`. This is what the documentation says: _Nodeunit exports runTest(fn, options), runModule(mod, options) and runFiles(paths, options)._ This is what...