Skip to content

Commit

Permalink
Don't format test code with trailing comma (#1835)
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg authored Sep 20, 2024
1 parent 0a36b82 commit b3f0d8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test-builder/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,10 @@ const compileCustomTest = async (

try {
// Use Prettier to format code
code = await prettier.format(code, {parser: "babel"});
code = await prettier.format(code, {
parser: "babel",
trailingComma: "none",
});
} catch (e) {
if (e instanceof SyntaxError) {
const errorMsg = `Test is malformed: ${e.message}`;
Expand Down

0 comments on commit b3f0d8c

Please sign in to comment.