empower-assert
to enable transparent assertion enhancementWe stopped providing prebuilt bundle for browsers. Please build your own by using browserify, webpack and so on. We also dropped bower support. Please use npm instead.
typeof options.sourceMap
is string (af6ba419)originalCode
is not specified (04d86abb)If you already customize instrumentation pattern using powerAssertVariableName
and targetMethods
, you need to migarte. To migrate, change your code from the following:
var espowerSource = require('espower-source');
var options = {
powerAssertVariableName: 'yourAssert',
targetMethods: {
oneArg: [
'okay'
],
twoArgs: [
'equal',
'customEqual'
]
}
};
var modifiedCode = espowerSource(originalCode, filepath, options);
To:
var espowerSource = require('espower-source');
var options = {
patterns: [
'yourAssert(value, [message])',
'yourAssert.okay(value, [message])',
'yourAssert.equal(actual, expected, [message])',
'yourAssert.customEqual(actual, expected, [message])'
]
};
var modifiedCode = espowerSource(originalCode, filepath, options);