Yes of course you should use continous integration with client side libraries.
I personally use PhantomJS (headless webkit browser) which is already installed in Travis-CI. I think this is the better option for client-side stuff than NodeJs.
If you use Grunt, it gets even easier to use, all you need is a simple Gruntfile.js file, your tests that run in browser (I use QUnit), and a simple .travis.yml
Gruntfile.js
:
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
qunit: {
files: ['test/index.html']
}
});
// Load plugin
grunt.loadNpmTasks('grunt-contrib-qunit');
// Task to run tests
grunt.registerTask('test', 'qunit');
};
.travis.yml
:
before_script:
- sudo npm install -g grunt
script: grunt test --verbose --force
You can see it in action at one of my projects (source on GitHub).