Skip to content

Commit 0510d80

Browse files
novemberbornsindresorhus
authored andcommitted
Reduce depth of formatted statements
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.
1 parent 4f87f32 commit 0510d80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/enhance-assert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const formatter = context => {
3737
return args
3838
.map(arg => {
3939
const range = getNode(ast, arg.espath).range;
40-
return [computeStatement(tokens, range), formatValue(arg.value)];
40+
return [computeStatement(tokens, range), formatValue(arg.value, {maxDepth: 1})];
4141
})
4242
.reverse();
4343
};

0 commit comments

Comments
 (0)