diff --git a/src/printer.js b/src/printer.js index 5a0d22b3..d2adf083 100644 --- a/src/printer.js +++ b/src/printer.js @@ -338,7 +338,8 @@ function genericPrintNoParens(path, options, print) { n.body.type === "JSXElement" || n.body.type === "BlockStatement" || n.body.type === "TaggedTemplateExpression" || - n.body.type === "TemplateElement" + n.body.type === "TemplateElement" || + n.body.type === "ClassExpression" ) { return group(collapsed); } diff --git a/tests/arrows/__snapshots__/jsfmt.spec.js.snap b/tests/arrows/__snapshots__/jsfmt.spec.js.snap index fa959434..98559667 100644 --- a/tests/arrows/__snapshots__/jsfmt.spec.js.snap +++ b/tests/arrows/__snapshots__/jsfmt.spec.js.snap @@ -140,7 +140,17 @@ function render() { /> ); -}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +} + +jest.mock( + '../SearchSource', + () => class { + findMatchingTests(pattern) { + return {paths: []}; + } + }, +); +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Seq(typeDef.interface.groups).forEach(group => Seq(group.members).forEach((member, memberName) => markdownDoc(member.doc, { @@ -209,6 +219,15 @@ function render() { ); } + +jest.mock( + \\"../SearchSource\\", + () => class { + findMatchingTests(pattern) { + return { paths: [] }; + } + } +); " `; diff --git a/tests/arrows/call.js b/tests/arrows/call.js index 99383312..3b2b5e2c 100644 --- a/tests/arrows/call.js +++ b/tests/arrows/call.js @@ -64,4 +64,13 @@ function render() { /> ); -} \ No newline at end of file +} + +jest.mock( + '../SearchSource', + () => class { + findMatchingTests(pattern) { + return {paths: []}; + } + }, +);