| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is the Node.js version of Edison, if you're after the .NET version go here.
This is still in alpha, so use at own risk. Though from testing it's pretty reliable.
See the examples/quick-start.test.js, and other files in examples, for usages.
Quick example:
var edison = require('../lib/edison.js').create();
edison.test('test-name', function(assert, done) {
var x = 3;
assert.areEqual(3, x); // will fail if x is not 3
done(); // must be called at a point where the test will have succesfully ended
});
edison.run();and to run:
node bin\edison examples\*.tests.jsor if you're using an Edisonfile, just:
node bin\edisonAn example of the output in 'dot' format on the CLI is:
.......
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Total: 7, Passed: 7, Failed: 0, Errored: 0, Inconclusive: 0, Skipped: 0
Success Rate: 1.0
Failure Rate: 0.0
Duration: 0d 0h 0m 1s 19ms
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =where the fullstops at the top indicate tests that have passed. Failed tests will appear as either 'F' or 'E' (Failed or Errored). Any tests that fail will be displayed after all tests have run. If any tests have failed the process will return with an exit code of 1, otherwise 0 for success.
The Edisonfile allows you to save, and version control, the arguments that you can supply to the binary. The file is of YAML format and should be saved at the root of your repository. The following is an example of the format:
test_files:
- tests\*.tests.js
disable_console_output: true
console_output_type: dot
sync_type: asyncTo use, just run run the edison binary at the root, with no arguments supplied. The framework will locate the Edisonfile and populate the parameters accordingly.
For example, the above will be just like running:
node bin\edison tests\*.tests.js --dco --cot dot --st asyncFor any bugs you may find or features you wish to request, please create an issue in GitHub.
| Back | FazBrowse Home | New Git URL |