Package Exports
- gulp-espower
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-espower) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
gulp-espower

A gulp plugin for power-assert.
Description
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) represented as Mozilla JavaScript AST, to instrument power-assert feature into the code. The magic is done by using Esprima and Escodegen.
Please note that gulp-espower
is a beta version product. Pull-requests, issue reports and patches are always welcomed. See power-assert project for more documentation.
Usage
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");
gulp.src("./test/*.js")
.pipe(espower())
.pipe(gulp.dest("./dist"));
API
espower(options)
options.patterns
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])'
]
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.
CHANGELOG
See CHANGELOG
License
Licensed under the MIT license.