Skip to content

lbragaglia/karma-wiredep

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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).

About

Loads all your bower dependencies into your test scope

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%