Try power-assert in your browser.
DEMO: http://azu.github.io/power-assert-demo
You can write test with power-assert.
power-assert API equal to Node.js assert module, but it's has very-meaningful results.
describe('Array', function(){
beforeEach(function(){
this.ary = [1,2,3];
});
describe('#indexOf()', function(){
it('should return index when the value is present', function(){
var zero = 0, two = 2;
assert(this.ary.indexOf(zero) === two);
});
it('should return -1 when the value is not present', function(){
var minusOne = -1, two = 2;
assert.ok(this.ary.indexOf(two) === minusOne, 'THIS IS AN ASSERTION MESSAGE');
});
});
});
Run the test code :
- mac: โ-return
- windows: ctrl-enter
It's depend on iframe'ssrcdoc
.
npm install
bower install
npm run watch
You should commit to master
, gh-pages
generated by travis-ci.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT