From 48bd6f8b4e1b4021b4a3894cd665c3e9b6f32686 Mon Sep 17 00:00:00 2001 From: Kermit Xuan <33770367+Kermit-Xuan@users.noreply.github.com> Date: Thu, 20 Dec 2018 13:52:06 +0800 Subject: [PATCH] Enable strict null checking for String test (#65449) --- src/tsconfig.strictNullChecks.json | 1 + src/vs/base/test/common/strings.test.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tsconfig.strictNullChecks.json b/src/tsconfig.strictNullChecks.json index 0ba7e065858..cbed844402a 100644 --- a/src/tsconfig.strictNullChecks.json +++ b/src/tsconfig.strictNullChecks.json @@ -145,6 +145,7 @@ "./vs/base/test/common/paths.test.ts", "./vs/base/test/common/resources.test.ts", "./vs/base/test/common/scrollable.test.ts", + "./vs/base/test/common/strings.test.ts", "./vs/base/test/common/types.test.ts", "./vs/base/test/common/utils.ts", "./vs/base/test/common/uuid.test.ts", diff --git a/src/vs/base/test/common/strings.test.ts b/src/vs/base/test/common/strings.test.ts index 2e8ee07797b..cee9c7a1b55 100644 --- a/src/vs/base/test/common/strings.test.ts +++ b/src/vs/base/test/common/strings.test.ts @@ -320,7 +320,7 @@ suite('Strings', () => { }); test('fuzzyContains', () => { - assert.ok(!strings.fuzzyContains(void 0, null)); + assert.ok(!strings.fuzzyContains((void 0)!, null!)); assert.ok(strings.fuzzyContains('hello world', 'h')); assert.ok(!strings.fuzzyContains('hello world', 'q')); assert.ok(strings.fuzzyContains('hello world', 'hw'));