diff --git a/tools/hermes-parser/js/prettier-plugin-hermes-parser/__tests__/match-test.js b/tools/hermes-parser/js/prettier-plugin-hermes-parser/__tests__/match-test.js index a086e861565..2cbe3f81395 100644 --- a/tools/hermes-parser/js/prettier-plugin-hermes-parser/__tests__/match-test.js +++ b/tools/hermes-parser/js/prettier-plugin-hermes-parser/__tests__/match-test.js @@ -74,6 +74,23 @@ describe('Match expression', () => { `); }); + test('sequence expressions: always with parens', async () => { + expect( + format(` + const e = match (x, y) { + 1: (x, y), + 2 if (x, y): 0, + }; + `), + ).toMatchInlineSnapshot(` + "const e = match ((x, y)) { + 1: (x, y), + 2 if (x, y): 0, + }; + " + `); + }); + test('patterns: core', async () => { expect( format(`