Karma plugin for ineeda
npm install karma-ineeda --DE
Add it to the frameworks
in your karma.conf
:
frameworks: ['ineeda'],
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);
}
}
}
}