Adds test for browserify

This commit adds tests to make sure that the browserify bundle will work in the dist file of clipboard.js

This commit adds the mocha and chai modules, since karma doesn't work well with node only tests.

Also splited tests tasks in package.json and updated .gitignore
This commit is contained in:
Mauricio Soares
2015-09-29 16:44:45 -03:00
committed by Zeno Rocha
parent 623614a4e0
commit 4534fc4ca0
4 changed files with 26 additions and 4 deletions

11
test/node.js Normal file
View File

@ -0,0 +1,11 @@
var assert = require('chai').assert;
var browserify = require('browserify');
describe('Node', function() {
it('should import the lib in a commonjs env without babel', function(done) {
browserify('./dist/clipboard.js').bundle(function(err) {
assert.equal(err, null);
done();
});
});
});