Skip to content

Commit

Permalink
[Tests] improve parser cases debug comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Nov 10, 2021
1 parent e5b9f35 commit 38628ed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/helpers/parsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ const parsers = {
const es = test.parserOptions && test.parserOptions.ecmaVersion;

function addComment(testObject, parser) {
const extraComment = `\n// features: [${Array.from(features).join(',')}], parser: ${parser}, parserOptions: ${testObject.parserOptions}`;
const extras = [].concat(
`features: [${Array.from(features).join(',')}]`,
`parser: ${parser}`,
testObject.parserOptions ? `parserOptions: ${JSON.stringify(testObject.parserOptions)}` : [],
testObject.options ? `options: ${JSON.stringify(testObject.options)}` : []
);
const extraComment = `\n// ${extras.join(', ')}`;
return Object.assign(
{},
testObject,
Expand Down

0 comments on commit 38628ed

Please sign in to comment.