diff --git a/packages/compiler-cli/ngcc/test/dependencies/dependency_resolver_spec.ts b/packages/compiler-cli/ngcc/test/dependencies/dependency_resolver_spec.ts index 89538b7169..1faf99947d 100644 --- a/packages/compiler-cli/ngcc/test/dependencies/dependency_resolver_spec.ts +++ b/packages/compiler-cli/ngcc/test/dependencies/dependency_resolver_spec.ts @@ -120,7 +120,7 @@ describe('DependencyResolver', () => { resolver = new DependencyResolver(new MockLogger(), {esm2015: host}); expect(() => resolver.sortEntryPointsByDependency([first])) .toThrowError( - `Could not find a suitable format for computing dependencies of entry-point: '/first'.`); + `Could not find a suitable format for computing dependencies of entry-point: '${first.path}'.`); }); it('should capture any dependencies that were ignored', () => { @@ -159,17 +159,17 @@ describe('DependencyResolver', () => { const result = resolver.sortEntryPointsByDependency([fifth, first, fourth, second, third]); expect(result.entryPoints).toEqual([fifth, fourth, third, second, first]); - expect(esm5Host.findDependencies).toHaveBeenCalledWith('/first/index.js'); - expect(esm5Host.findDependencies).not.toHaveBeenCalledWith('/second/sub/index.js'); - expect(esm5Host.findDependencies).toHaveBeenCalledWith('/third/index.js'); - expect(esm5Host.findDependencies).not.toHaveBeenCalledWith('/fourth/sub2/index.js'); - expect(esm5Host.findDependencies).toHaveBeenCalledWith('/fifth/index.js'); + expect(esm5Host.findDependencies).toHaveBeenCalledWith(`${first.path}/index.js`); + expect(esm5Host.findDependencies).not.toHaveBeenCalledWith(`${second.path}/sub/index.js`); + expect(esm5Host.findDependencies).toHaveBeenCalledWith(`${third.path}/index.js`); + expect(esm5Host.findDependencies).not.toHaveBeenCalledWith(`${fourth.path}/sub2/index.js`); + expect(esm5Host.findDependencies).toHaveBeenCalledWith(`${fifth.path}/index.js`); - expect(esm2015Host.findDependencies).not.toHaveBeenCalledWith('/first/index.js'); - expect(esm2015Host.findDependencies).toHaveBeenCalledWith('/second/sub/index.js'); - expect(esm2015Host.findDependencies).not.toHaveBeenCalledWith('/third/index.js'); - expect(esm2015Host.findDependencies).toHaveBeenCalledWith('/fourth/sub2/index.js'); - expect(esm2015Host.findDependencies).not.toHaveBeenCalledWith('/fifth/index.js'); + expect(esm2015Host.findDependencies).not.toHaveBeenCalledWith(`${first.path}/index.js`); + expect(esm2015Host.findDependencies).toHaveBeenCalledWith(`${second.path}/sub/index.js`); + expect(esm2015Host.findDependencies).not.toHaveBeenCalledWith(`${third.path}/index.js`); + expect(esm2015Host.findDependencies).toHaveBeenCalledWith(`${fourth.path}/sub2/index.js`); + expect(esm2015Host.findDependencies).not.toHaveBeenCalledWith(`${fifth.path}/index.js`); }); interface DepMap { diff --git a/packages/compiler-cli/ngcc/test/dependencies/umd_dependency_host_spec.ts b/packages/compiler-cli/ngcc/test/dependencies/umd_dependency_host_spec.ts index 5423506e20..5f348c4566 100644 --- a/packages/compiler-cli/ngcc/test/dependencies/umd_dependency_host_spec.ts +++ b/packages/compiler-cli/ngcc/test/dependencies/umd_dependency_host_spec.ts @@ -69,7 +69,7 @@ describe('UmdDependencyHost', () => { expect(dependencies.size).toBe(0); expect(missing.size).toBe(0); expect(deepImports.size).toBe(1); - expect(deepImports.has('/node_modules/lib_1/deep/import')).toBe(true); + expect(deepImports.has(_('/node_modules/lib_1/deep/import'))).toBe(true); }); it('should recurse into internal dependencies', () => {