From 0e9cabab3fb4c15fb1b88e62a35ccf1ea52ef853 Mon Sep 17 00:00:00 2001 From: Tetsuharu OHZEKI Date: Thu, 12 Dec 2019 00:49:54 +0900 Subject: Enable noImplicitReturns option for vscode extension --- editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts | 3 ++- .../code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts | 6 ++++-- editors/code/src/test/utils/diagnotics/rust.test.ts | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'editors/code/src/test') diff --git a/editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts b/editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts index 96ec8c614..2b25eb705 100644 --- a/editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts +++ b/editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts @@ -114,7 +114,8 @@ describe('SuggestedFix', () => { const edit = codeAction.edit; if (!edit) { - return assert.fail('Code Action edit unexpectedly missing'); + assert.fail('Code Action edit unexpectedly missing'); + return; } const editEntries = edit.entries(); diff --git a/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts b/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts index 4c1467b57..ef09013f4 100644 --- a/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts +++ b/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts @@ -53,7 +53,8 @@ describe('SuggestedFixCollection', () => { const { diagnostics } = codeAction; if (!diagnostics) { - return assert.fail('Diagnostics unexpectedly missing'); + assert.fail('Diagnostics unexpectedly missing'); + return; } assert.strictEqual(diagnostics.length, 1); @@ -114,7 +115,8 @@ describe('SuggestedFixCollection', () => { const { diagnostics } = codeAction; if (!diagnostics) { - return assert.fail('Diagnostics unexpectedly missing'); + assert.fail('Diagnostics unexpectedly missing'); + return; } // We should be associated with both diagnostics diff --git a/editors/code/src/test/utils/diagnotics/rust.test.ts b/editors/code/src/test/utils/diagnotics/rust.test.ts index cee59061f..0222dbbaa 100644 --- a/editors/code/src/test/utils/diagnotics/rust.test.ts +++ b/editors/code/src/test/utils/diagnotics/rust.test.ts @@ -120,7 +120,8 @@ describe('mapRustDiagnosticToVsCode', () => { // One related information for the original definition const relatedInformation = diagnostic.relatedInformation; if (!relatedInformation) { - return assert.fail('Related information unexpectedly undefined'); + assert.fail('Related information unexpectedly undefined'); + return; } assert.strictEqual(relatedInformation.length, 1); const [related] = relatedInformation; @@ -154,7 +155,8 @@ describe('mapRustDiagnosticToVsCode', () => { // One related information for the lint definition const relatedInformation = diagnostic.relatedInformation; if (!relatedInformation) { - return assert.fail('Related information unexpectedly undefined'); + assert.fail('Related information unexpectedly undefined'); + return; } assert.strictEqual(relatedInformation.length, 1); const [related] = relatedInformation; -- cgit v1.2.3