karma-es6-transpiler-preprocessor

raw JSON →
0.0.1 verified Fri May 01 auth: no javascript deprecated

A Karma preprocessor that transpiles ES6 JavaScript code to ES5 using es6-transpiler. Version 0.0.1, last updated in 2014. This package is essentially abandoned; es6-transpiler is no longer maintained, and modern projects should use Babel or TypeScript instead. It works only with Karma and requires no direct dependencies but relies on es6-transpiler being installed (though not listed as a peer dependency).

error Error: Module "es6-transpiler" not found
cause es6-transpiler is not installed.
fix
Run 'npm install es6-transpiler --save-dev'
error No provider for "preprocessor:es6-transpiler"!
cause Preprocessor setup is incorrect or missing.
fix
Ensure preprocessors key uses array format: '*.js': ['es6-transpiler']
deprecated es6-transpiler is no longer maintained. Consider using Babel or TypeScript instead.
fix Replace with karma-babel-preprocessor or @karma-typescript
gotcha The preprocessors value must be an array, not a string. Misconfiguration leads to silent failure.
fix Ensure preprocessor values are arrays: ['es6-transpiler']
gotcha es6-transpiler is not automatically installed as a dependency; you must install it separately.
fix Run 'npm install es6-transpiler --save-dev' in addition to this preprocessor
npm install karma-es6-transpiler-preprocessor
yarn add karma-es6-transpiler-preprocessor
pnpm add karma-es6-transpiler-preprocessor

Shows how to configure Karma to use the es6-transpiler preprocessor for all JS files in source and spec directories.

// karma.conf.js
module.exports = function(config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine'],
    files: ['src/**/*.js', 'spec/**/*.spec.js'],
    preprocessors: {
      'src/**/*.js': ['es6-transpiler'],
      'spec/**/*.spec.js': ['es6-transpiler']
    },
    browsers: ['ChromeHeadless'],
    singleRun: true
  });
};