Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed May 27, 2022
1 parent b08b692 commit d256261
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/babel-parser/test/helpers/run-fixture-tests.js
Expand Up @@ -86,7 +86,7 @@ const toJustErrors = result => ({
function runParseTest(parse, test, onlyCompareErrors) {
const { adjust, expected, source, filename, options } = test;

if (expected.threw && expected.ast) {
if (!OVERWRITE && expected.threw && expected.ast) {
throw Error(
"File expected.json exists although options specify throws. Remove expected.json.",
);
Expand Down Expand Up @@ -140,7 +140,7 @@ function runParseTest(parse, test, onlyCompareErrors) {
// otherwise remove it.
if (Object.keys(newOptions).length <= 0) {
rmf(optionsLocation);
} else if (throws) {
} else if (throws !== expectedThrows) {
// The idea here is that we shouldn't need to change anything if this doesn't
// throw, and stringify will produce different output than what prettier
// wants.
Expand Down

0 comments on commit d256261

Please sign in to comment.