karma-bower

1.0.1 • Public • Published

karma-bower Build Status

Loads bower packages into your test scope.

If you want to have extra test libraries into your karma tests, such as sinon or jasmine-jquery, you can easily do it with this plugin and bower

Simple example

npm install karma-bower --save-dev

Then install your interested package via bower

Add into your karma.conf.js

module.exports = function(config) {
    config.set({
        frameworks: ['bower', 'jasmine'],
        
        //then you can load any package from bower into your tests
        bowerPackages: [
            'jquery',
            'sinonjs',
            'jasmine-ajax',
            'chai',
            'jasmine-jquery'
        ]
    });
};

You can include any package that you need. The only requirement is to have it installed via bower and have the main section in its bower.json.

Also note that plugin should be included in frameworks section before you test framework (mocha or jasmine).

Readme

Keywords

none

Package Sidebar

Install

npm i karma-bower

Weekly Downloads

33

Version

1.0.1

License

MIT

Last publish

Collaborators

  • just-boris