Changelog
0.8.0 (2014-08-12)
escallmatch
module to describe target patterns (533a21a0)targetMethods
does not required any more (8ffcc49f)saveContextOnFail
option to saveContextOnRethrow
(1f6133b2)modifyMessageOnFail
option to modifyMessageOnRethrow
(0c8a88f0)saveContextOnFail
option is renamed to saveContextOnRethrow
There is nothing to change unless you are using saveContextOnFail
option.
If you are using saveContextOnFail
option, change your code from the following:
empower(originalAssert, formatter, {saveContextOnFail: true})
To:
empower(originalAssert, formatter, {saveContextOnRethrow: true})
(1f6133b2)
modifyMessageOnFail
option is renamed to modifyMessageOnRethrow
There is nothing to change unless you are using modifyMessageOnFail
option.
If you are using modifyMessageOnFail
option, change your code from the following:
empower(originalAssert, formatter, {modifyMessageOnFail: true})
To:
empower(originalAssert, formatter, {modifyMessageOnRethrow: true})
(0c8a88f0)
targetMethods
does not required any moreIf you already customize enhancement pattern using targetMethods
, you need to migarte. To migrate, change your code from the following:
var yourAssert = require('./your-assert');
var empower = require('empower');
var formatter = require('power-assert-formatter')();
var options = {
targetMethods: {
oneArg: [
'okay'
],
twoArgs: [
'equal',
'customEqual'
]
}
};
var assert = empower(yourAssert, formatter, options);
To:
var yourAssert = require('./your-assert');
var empower = require('empower');
var formatter = require('power-assert-formatter')();
var options = {
patterns: [
'yourAssert(value, [message])',
'yourAssert.okay(value, [message])',
'yourAssert.equal(actual, expected, [message])',
'yourAssert.customEqual(actual, expected, [message])'
]
};
var assert = empower(yourAssert, formatter, options);
(8ffcc49f)