Skip to content

Commit

Permalink
Reduce depth of formatted statements
Browse files Browse the repository at this point in the history
Only print the first level. For arrays/maps/objects/sets this means the
indexes/keys are printed. Presumably since we do print all statements
this provides enough context.
  • Loading branch information
novemberborn authored and sindresorhus committed Mar 17, 2017
1 parent 4f87f32 commit 0510d80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/enhance-assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const formatter = context => {
return args
.map(arg => {
const range = getNode(ast, arg.espath).range;
return [computeStatement(tokens, range), formatValue(arg.value)];
return [computeStatement(tokens, range), formatValue(arg.value, {maxDepth: 1})];
})
.reverse();
};
Expand Down

0 comments on commit 0510d80

Please sign in to comment.