Skip to content

Commit

Permalink
support async functions and bump lab version
Browse files Browse the repository at this point in the history
  • Loading branch information
cjihrig committed Jul 14, 2017
1 parent 2559673 commit cf692d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/index.js
Expand Up @@ -273,7 +273,7 @@ internals.equal = function (value, options) {
const settings = Hoek.applyToDefaults({ prototype: exports.settings.comparePrototypes }, options);

const compare = this._flags.shallow ? (a, b) => a === b
: (a, b) => Hoek.deepEqual(a, b, settings);
: (a, b) => Hoek.deepEqual(a, b, settings);

return this.assert(compare(this._ref, value), `equal specified value: ${internals.display(value)}`, this._ref, value);
};
Expand Down Expand Up @@ -402,7 +402,7 @@ internals.addMethod(['throw', 'throws'], internals.throw);
internals.display = function (value) {

const string = value instanceof Error ? `[${value.toString()}]` :
NodeUtil.inspect(value);
NodeUtil.inspect(value);

if (!exports.settings.truncateMessages || string.length <= 40) {
return string;
Expand All @@ -424,6 +424,7 @@ internals.display = function (value) {
internals.natives = {
'[object Arguments]': 'arguments',
'[object Array]': 'array',
'[object AsyncFunction]': 'function',
'[object Date]': 'date',
'[object Function]': 'function',
'[object Number]': 'number',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -16,7 +16,7 @@
"hoek": "4.x.x"
},
"devDependencies": {
"lab": "13.x.x",
"lab": "14.x.x",
"markdown-toc": "1.1.x"
},
"scripts": {
Expand Down

0 comments on commit cf692d0

Please sign in to comment.