From 230e9766f6e6b8ce30b0cf8c39a891c3ba28d5be Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Tue, 11 Jun 2019 07:23:53 +0200 Subject: [PATCH] test(ivy): fix strict null checks failures in ngcc tests (#30967) 9d9c9e43e544ac2ecf74e20d31ba3bd1064db6c9 has been created a few days ago and wasn't rebased on top of recent changes that introduces a commonjs host. This means that tests for the commonjs host haven't been updated to work with the changes from from #30492 and now fail in `master`. PR Close #30967 --- .../compiler-cli/ngcc/test/host/commonjs_host_spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/compiler-cli/ngcc/test/host/commonjs_host_spec.ts b/packages/compiler-cli/ngcc/test/host/commonjs_host_spec.ts index 95be061397..051d4f273d 100644 --- a/packages/compiler-cli/ngcc/test/host/commonjs_host_spec.ts +++ b/packages/compiler-cli/ngcc/test/host/commonjs_host_spec.ts @@ -1273,7 +1273,7 @@ describe('CommonJsReflectionHost', () => { const fooNode = getDeclaration(program, FUNCTION_BODY_FILE.name, 'foo', isNamedFunctionDeclaration) !; - const fooDef = host.getDefinitionOfFunction(fooNode); + const fooDef = host.getDefinitionOfFunction(fooNode) !; expect(fooDef.node).toBe(fooNode); expect(fooDef.body !.length).toEqual(1); expect(fooDef.body ![0].getText()).toEqual(`return x;`); @@ -1283,7 +1283,7 @@ describe('CommonJsReflectionHost', () => { const barNode = getDeclaration(program, FUNCTION_BODY_FILE.name, 'bar', isNamedFunctionDeclaration) !; - const barDef = host.getDefinitionOfFunction(barNode); + const barDef = host.getDefinitionOfFunction(barNode) !; expect(barDef.node).toBe(barNode); expect(barDef.body !.length).toEqual(1); expect(ts.isReturnStatement(barDef.body ![0])).toBeTruthy(); @@ -1296,7 +1296,7 @@ describe('CommonJsReflectionHost', () => { const bazNode = getDeclaration(program, FUNCTION_BODY_FILE.name, 'baz', isNamedFunctionDeclaration) !; - const bazDef = host.getDefinitionOfFunction(bazNode); + const bazDef = host.getDefinitionOfFunction(bazNode) !; expect(bazDef.node).toBe(bazNode); expect(bazDef.body !.length).toEqual(3); expect(bazDef.parameters.length).toEqual(1); @@ -1305,7 +1305,7 @@ describe('CommonJsReflectionHost', () => { const quxNode = getDeclaration(program, FUNCTION_BODY_FILE.name, 'qux', isNamedFunctionDeclaration) !; - const quxDef = host.getDefinitionOfFunction(quxNode); + const quxDef = host.getDefinitionOfFunction(quxNode) !; expect(quxDef.node).toBe(quxNode); expect(quxDef.body !.length).toEqual(2); expect(quxDef.parameters.length).toEqual(1);