0.3.1-beta.0 • Published 7 years ago

karma-ineeda v0.3.1-beta.0

Weekly downloads
12
License
MIT
Repository
github
Last release
7 years ago

karma-ineeda

npm version

Karma plugin for ineeda

Installation:

npm install karma-ineeda --DE

Usage:

Add it to the frameworks in your karma.conf:

frameworks: ['ineeda'],

Config:

You can add a custom URL mapping function to transform URLs to file paths to request files, for example to handle webpack URLs:

// karma.conf.js
module.exports = {
    frameworks: ['ineeda'],
    // ...
    ineeda: {
        mappingUrl: function (url, config, next) {
            let { basePath } = config;

            // Handle webpack URLs:            
            if (url.match(/webpack:/)) {
                return url.replace(/.*webpack:/, basePath);
            }
        }
    }
}