diff --git a/packages/babel-parser/test/fixtures/typescript/regression/nested-extends-in-arrow-type-param/output.json b/packages/babel-parser/test/fixtures/typescript/regression/nested-extends-in-arrow-type-param/output.json index c12044f25fea..453805884d68 100644 --- a/packages/babel-parser/test/fixtures/typescript/regression/nested-extends-in-arrow-type-param/output.json +++ b/packages/babel-parser/test/fixtures/typescript/regression/nested-extends-in-arrow-type-param/output.json @@ -30,7 +30,7 @@ "extendsType": { "type": "TSFunctionType", "start":24,"end":53,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":53,"index":53}}, - "parameters": [ + "params": [ { "type": "Identifier", "start":25,"end":47,"loc":{"start":{"line":1,"column":25,"index":25},"end":{"line":1,"column":47,"index":47},"identifierName":"x"}, @@ -81,7 +81,7 @@ } } ], - "typeAnnotation": { + "returnType": { "type": "TSTypeAnnotation", "start":49,"end":53,"loc":{"start":{"line":1,"column":49,"index":49},"end":{"line":1,"column":53,"index":53}}, "typeAnnotation": { diff --git a/packages/babel-parser/test/fixtures/typescript/regression/nested-extends-in-arrow-type-return/output.json b/packages/babel-parser/test/fixtures/typescript/regression/nested-extends-in-arrow-type-return/output.json index a73a42f0f0c1..9e144e4cb05a 100644 --- a/packages/babel-parser/test/fixtures/typescript/regression/nested-extends-in-arrow-type-return/output.json +++ b/packages/babel-parser/test/fixtures/typescript/regression/nested-extends-in-arrow-type-return/output.json @@ -30,8 +30,8 @@ "extendsType": { "type": "TSFunctionType", "start":24,"end":49,"loc":{"start":{"line":1,"column":24,"index":24},"end":{"line":1,"column":49,"index":49}}, - "parameters": [], - "typeAnnotation": { + "params": [], + "returnType": { "type": "TSTypeAnnotation", "start":27,"end":49,"loc":{"start":{"line":1,"column":27,"index":27},"end":{"line":1,"column":49,"index":49}}, "typeAnnotation": { diff --git a/packages/babel-parser/test/helpers/run-fixture-tests.js b/packages/babel-parser/test/helpers/run-fixture-tests.js index 8d247a5fb54b..9719ba02ad4a 100644 --- a/packages/babel-parser/test/helpers/run-fixture-tests.js +++ b/packages/babel-parser/test/helpers/run-fixture-tests.js @@ -113,7 +113,7 @@ function runParseTest(parse, test, onlyCompareErrors) { // store for each error in the `errors` array. In both cases, we should // serialize the full error to be able to property test locations, // reasonCodes, etc. - const throws = !!actual.threw && actual.threw.message; + const throws = actual.threw ? actual.threw.message : undefined; const optionsLocation = join(testLocation, "options.json"); // We want to throw away the contents of `throws` here.