Try power-assert in your browser.
MIT License
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 :
It's depend on iframe'ssrcdoc
.
npm install
bower install
npm run watch
You should commit to master
, gh-pages
generated by travis-ci.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT