Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed Mar 4, 2021
1 parent b48304f commit 0308d7d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests_config/run_spec.js
Expand Up @@ -293,6 +293,15 @@ function runTest({
});
}

if (formatResult.changed && code.trim()) {
test(`[${parser}] compare AST`, () => {
const { input, output } = formatResult;
const originalAst = parse(input, formatOptions);
const formattedAst = parse(output, formatOptions);
expect(formattedAst).toEqual(originalAst);
});
}

if (!shouldSkipEolTest(code, formatResult.options)) {
for (const eol of ["\r\n", "\r"]) {
test(`[${parser}] EOL ${JSON.stringify(eol)}`, () => {
Expand Down

0 comments on commit 0308d7d

Please sign in to comment.