karma-ineeda
v0.3.1-beta.0
Published
Karma plugin for ineeda
Downloads
4
Readme
karma-ineeda
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);
}
}
}
}