A Karma preprocessor for the Bublé ES2015+ compiler.
As Bublé is no longer under active development, there is no plan to add new features to this module. However critical security issues may be fixed.
To install as a devDependency
:
npm install --save-dev karma-buble-preprocessor
Just add it to the preprocessors
section of your Karma configuration file, for instance:
// karma.conf.js
module.exports = function (config) {
config.set({
preprocessors: {
'test/**/*.js': ['buble']
}
})
}
This preprocessor uses Bublé to transpile JavaScript ES2015+ into ES5 suitable for older runtimes.
- Bublé will not handle
import
statements in the code, so consider using a packager such as karma-rollup-preprocessor instead. - The result of the transpilation is not saved, so for implementation code, consider using buble-loader in webpack, or rollup-plugin-buble in rollup, so that the tests are run on what is shipped.
See LICENSE.md
See CONTRIBUTING.md