From 7807778478dc2a8a25210a9e3711f27ac3703763 Mon Sep 17 00:00:00 2001 From: Torleif Berger Date: Wed, 22 May 2019 22:32:58 +0200 Subject: [PATCH] Added tests to cover remaining branch in my code --- .../explicit-function-return-type.test.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts b/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts index 943ccbcf552..5db73d046e3 100644 --- a/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts +++ b/packages/eslint-plugin/tests/rules/explicit-function-return-type.test.ts @@ -238,6 +238,13 @@ function FunctionDeclaration() { `, options: [{ allowCurrying: true }], }, + { + filename: 'test.ts', + code: ` +() => () => { return (): void => { return; } }; + `, + options: [{ allowCurrying: true }], + }, ], invalid: [ { @@ -529,5 +536,19 @@ function FunctionDeclaration() { }, ], }, + { + filename: 'test.ts', + code: ` +() => () => { return () => { return; } }; + `, + options: [{ allowCurrying: true }], + errors: [ + { + messageId: 'missingReturnType', + line: 2, + column: 22, + }, + ], + }, ], });