Skip to content

Commit

Permalink
Add failing test for #549
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Dec 31, 2018
1 parent 1248cb8 commit 020d843
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/types/function-type.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,19 @@ describe('function type', () => {
});
}

var implicitReturnArrowFunction;
try {
// eslint-disable-next-line no-new-func
implicitReturnArrowFunction = new Function('return a =>\n a')();
} catch (e) {}

if (implicitReturnArrowFunction) {
it('should render an implicit return arrow function a single line break after the arrow', () => {
// eslint-disable-next-line no-eval
expect(eval(`a =>\n a`), 'to inspect as', `a =>\n a`);
});
}

// We can't complete this test if the runtime doesn't support arrow functions:
var evilImplicitReturnMultilineArrowFunction;
try {
Expand Down

0 comments on commit 020d843

Please sign in to comment.