Skip to content

Commit e141827

Browse files
committed
put all tests inside an await Promise.all()
1 parent 73102a3 commit e141827

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

tests/config/run-test.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,22 @@ async function runTest({
6464
if (!FULL_TEST) {
6565
return;
6666
}
67-
await testAntlrFormat.run(code, formatResult, filename, formatOptions);
68-
await testVariantCoverage.run(code, formatResult, filename, formatOptions);
69-
await testSecondFormat.run(code, formatResult, filename, formatOptions);
70-
await testAstCompare.run(code, formatResult, filename, formatOptions);
71-
await testEndOfLine.run(code, formatResult, filename, formatOptions, "\r\n");
72-
await testEndOfLine.run(code, formatResult, filename, formatOptions, "\r");
73-
await testBom.run(code, formatResult, filename, formatOptions);
74-
await testBytecodeCompare.run(code, formatResult, filename, formatOptions);
67+
await Promise.all(
68+
[
69+
testAntlrFormat,
70+
testVariantCoverage,
71+
testSecondFormat,
72+
testAstCompare,
73+
testBom,
74+
testBytecodeCompare,
75+
]
76+
.map((test) => test.run(code, formatResult, filename, formatOptions))
77+
.join(
78+
["\r\n", "\r"].map((eol) =>
79+
testEndOfLine.run(code, formatResult, filename, formatOptions, eol),
80+
),
81+
),
82+
);
7583
}
7684

7785
export { runTest };

0 commit comments

Comments
 (0)