espower-source
Advanced tools
Changelog
0.8.0 (2014-08-12)
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);