From 38628eddad4ef06b14de98847529ae2377847774 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 9 Nov 2021 21:37:49 -0800 Subject: [PATCH] [Tests] improve parser cases debug comment --- tests/helpers/parsers.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/helpers/parsers.js b/tests/helpers/parsers.js index 321e57dc14..26bac83db7 100644 --- a/tests/helpers/parsers.js +++ b/tests/helpers/parsers.js @@ -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,