Karma preprocessor for power-assert
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
index.js
package.json

README.md

karma-espower-preprocessor

Preprocess source code by espower-source

sample

Installation

npm install karma-espower-preprocessor --save-dev

I'm recommend to use with karma-sourcemap-loader if you use some altJS.

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    preprocessors: {
      '**/*.js': ['espower']
      // '**/*.js': ['sourcemap', 'espower']
    },

    espowerPreprocessor: {
      options: {
        // emit espowerified code.
        // default: false (in-memory)
        emitActualCode: true,
        // ignore upstream SourceMap info.
        // default: false
        ignoreUpstreamSourceMap: false
      },
      transformPath: function(path) {
        // default
        return path.replace(/\.js$/, '.espowered.js');
      }
    }
  });
};