A gulp plugin for power-assert
Last updated 4 years ago by twada .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-espower 
SYNC missed versions from official npm registry.


Build Status NPM version Dependency Status License

A gulp plugin for power-assert.


gulp-espower is a gulp plugin to instrument "Power Assert" feature into your code.

Internally, gulp-espower task uses espower module that manipulates assertion expression (JavaScript Code) defined in The ESTree Spec (formerly known as Mozilla SpiderMonkey Parser API), to instrument power-assert feature into the code. The magic is done by using Esprima and Escodegen.

Pull-requests, issue reports and patches are always welcomed. See power-assert project for more documentation.


First, install gulp-espower as a development dependency:

npm install --save-dev gulp-espower

Then, add it to your gulpfile.js:

var espower = require('gulp-espower');


Source maps

gulp-espower works with gulp-sourcemaps to generate source maps for the instrumented javascript code. Note that you should init gulp-sourcemaps prior to running the gulp-espower and write the source maps after. gulp-espower works well with some gulp plugins that supports gulp-sourcemaps.

var espower = require('gulp-espower');
var coffee = require('gulp-coffee');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');

// compile, instrument then concatinate
// will write the source maps inline in the code

For more information, see gulp-sourcemaps.




type default value
Array of string objects shown below
    'assert(value, [message])',
    'assert.ok(value, [message])',
    'assert.equal(actual, expected, [message])',
    'assert.notEqual(actual, expected, [message])',
    'assert.strictEqual(actual, expected, [message])',
    'assert.notStrictEqual(actual, expected, [message])',
    'assert.deepEqual(actual, expected, [message])',
    'assert.notDeepEqual(actual, expected, [message])',
    'assert.deepStrictEqual(actual, expected, [message])',
    'assert.notDeepStrictEqual(actual, expected, [message])'

Target patterns for power assert feature instrumentation.

If callee name (for example, assert.equal) matches exactly and number of arguments is satisfied, then the assertion will be modified. Detection is done by escallmatch. Any arguments enclosed in bracket (for example, [message]) means optional parameters. Without bracket means mandatory parameters.




We support Node under maintenance. In other words, we stop supporting old Node version when their maintenance ends.

This means that any other environment is not supported.

NOTE: If espower-cli works in any of the unsupported environments, it is purely coincidental and has no bearing on future compatibility. Use at your own risk.




Licensed under the MIT license.

Current Tags

  • 1.1.0                                ...           latest (4 years ago)

16 Versions

  • 1.1.0                                ...           4 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.10.1                                ...           5 years ago
  • 0.10.0                                ...           6 years ago
  • 0.9.1                                ...           6 years ago
  • 0.9.0                                ...           6 years ago
  • 0.8.0                                ...           6 years ago
  • 0.7.1                                ...           6 years ago
  • 0.7.0                                ...           6 years ago
  • 0.6.0                                ...           6 years ago
  • 0.5.0                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.1                                ...           6 years ago
  • 0.3.0                                ...           7 years ago
Maintainers (1)
Today 0
This Week 0
This Month 16
Last Day 0
Last Week 16
Last Month 33
Dependencies (14)
Dev Dependencies (3)

Copyright 2014 - 2016 © |