From 2f35dbfd3b9f6d633ed272b67f177278a0541f6f Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 26 Apr 2019 16:14:05 +0200 Subject: [PATCH] test: fix ngtsc tests in windows (#30146) This commit fixes the following test target in windows ``` //packages/compiler-cli/test/ngtsc:ngtsc ``` PR Close #30146 --- .codefresh/codefresh.yml | 2 +- packages/compiler-cli/test/ngtsc/env.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.codefresh/codefresh.yml b/.codefresh/codefresh.yml index 38cef7a59a..2032ec4c5d 100644 --- a/.codefresh/codefresh.yml +++ b/.codefresh/codefresh.yml @@ -20,7 +20,7 @@ steps: # Add Bazel CI config - copy .codefresh\bazel.rc %ProgramData%\bazel.bazelrc # Run tests - - yarn bazel test //tools/ts-api-guardian:all //packages/language-service/test //packages/compiler/test //packages/compiler-cli/test:ngc + - yarn bazel test //tools/ts-api-guardian:all //packages/language-service/test //packages/compiler/test //packages/compiler-cli/test:ngc //packages/compiler-cli/test/ngtsc:ngtsc - yarn test-ivy-aot //packages/animations/test //packages/common/test //packages/forms/test //packages/http/test //packages/platform-browser/test //packages/platform-browser-dynamic/test //packages/router/test - yarn bazel test //tools/public_api_guard/... - yarn bazel test //packages/compiler-cli/integrationtest:integrationtest //packages/compiler-cli/test/compliance:compliance diff --git a/packages/compiler-cli/test/ngtsc/env.ts b/packages/compiler-cli/test/ngtsc/env.ts index 52281fb454..98e5f4bd0e 100644 --- a/packages/compiler-cli/test/ngtsc/env.ts +++ b/packages/compiler-cli/test/ngtsc/env.ts @@ -29,7 +29,7 @@ function setupFakeCore(support: TestSupport): void { const nodeModulesPath = path.join(support.basePath, 'node_modules'); const angularCoreDirectory = path.join(nodeModulesPath, '@angular/core'); - fs.symlinkSync(fakeNpmPackageDir, angularCoreDirectory, 'dir'); + fs.symlinkSync(fakeNpmPackageDir, angularCoreDirectory, 'junction'); } /** @@ -121,7 +121,7 @@ export class NgtscTestEnvironment { if (this.multiCompileHostExt === null) { throw new Error(`Not tracking written files - call enableMultipleCompilations()`); } - const outDir = path.join(this.support.basePath, 'built'); + const outDir = path.posix.join(this.support.basePath, 'built'); const writtenFiles = new Set(); this.multiCompileHostExt.getFilesWrittenSinceLastFlush().forEach(rawFile => { if (rawFile.startsWith(outDir)) {