Skip to content

Commit 0dbe80e

Browse files
committed
test: insert trailing newline in files generated with --save-actual-as-expected
The proper formatting is done by prettier via husky, but this part is easy to fix
1 parent 081adce commit 0dbe80e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spec/regression/regression-suite.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,11 @@ export class RegressionSuite {
406406
}
407407

408408
if (this.options.saveActualAsExpected && !deepEqual(actualResult, expectedResult)) {
409-
writeFileSync(resultPath, JSON.stringify(actualResult, undefined, ' '), 'utf-8');
409+
writeFileSync(
410+
resultPath,
411+
formatWhitespaceInFile(JSON.stringify(actualResult, undefined, ' ')),
412+
'utf-8',
413+
);
410414
}
411415

412416
return {

0 commit comments

Comments
 (0)