kw

karma-wiredep

Loads all your bower dependencies into your test scope

Showing:

Popularity

Downloads/wk

908

GitHub Stars

2

Maintenance

Last Commit

3yrs ago

Contributors

6

Package

Dependencies

1

Size (min+gzip)

37.4KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

karma-wiredep Build Status Greenkeeper badge

Loads bower dependencies into your test scope.

If you want to have all of your production or development bower dependencies into your karma tests, such as sinon or jasmine-jquery, you can easily do it with this plugin with the help of wiredep

Simple example

npm install karma-wiredep --save-dev

Then add into your karma.conf.js

module.exports = function(config) {
    config.set({
        frameworks: ['wiredep', 'jasmine'],
        
        //you can configure wiredep from here (optional)
        wiredep: {
            dependencies: true,    // default: true 
            devDependencies: true, // default: false 
            exclude: [ /jquery/, 'bower_components/modernizr/modernizr.js' ],
            overrides: { ... }
        },

        plugins : [ 'karma-wiredep' ]
    });
};

All the bower dependencies will be included. If some package is missing the main section in its bower.json, you can configure the overrides section for that package.

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100