Skip to content

Commit 38628ed

Browse files
committed
[Tests] improve parser cases debug comment
1 parent e5b9f35 commit 38628ed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/helpers/parsers.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ const parsers = {
6060
const es = test.parserOptions && test.parserOptions.ecmaVersion;
6161

6262
function addComment(testObject, parser) {
63-
const extraComment = `\n// features: [${Array.from(features).join(',')}], parser: ${parser}, parserOptions: ${testObject.parserOptions}`;
63+
const extras = [].concat(
64+
`features: [${Array.from(features).join(',')}]`,
65+
`parser: ${parser}`,
66+
testObject.parserOptions ? `parserOptions: ${JSON.stringify(testObject.parserOptions)}` : [],
67+
testObject.options ? `options: ${JSON.stringify(testObject.options)}` : []
68+
);
69+
const extraComment = `\n// ${extras.join(', ')}`;
6470
return Object.assign(
6571
{},
6672
testObject,

0 commit comments

Comments
 (0)