From 6c2d931744b482a707760809eb4e66a5722599d6 Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Wed, 23 Nov 2016 14:23:05 -0800 Subject: [PATCH] chore: make test.sh work again Previously, `test.sh` relied on calling `build.sh` first --- modules/@angular/language-service/test/test_utils.ts | 3 +-- test.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/@angular/language-service/test/test_utils.ts b/modules/@angular/language-service/test/test_utils.ts index 9979afe637..7b4bc3b8f2 100644 --- a/modules/@angular/language-service/test/test_utils.ts +++ b/modules/@angular/language-service/test/test_utils.ts @@ -73,8 +73,7 @@ export class MockTypescriptHost implements ts.LanguageServiceHost { constructor(private scriptNames: string[], private data: MockData) { let angularIndex = module.filename.indexOf('@angular'); if (angularIndex >= 0) - this.angularPath = - module.filename.substr(0, angularIndex).replace('/all/', '/packages-dist/'); + this.angularPath = module.filename.substr(0, angularIndex).replace('/all/', '/all/@angular/'); let distIndex = module.filename.indexOf('/dist/all'); if (distIndex >= 0) this.nodeModulesPath = path.join(module.filename.substr(0, distIndex), 'node_modules'); diff --git a/test.sh b/test.sh index fb2b8403e7..8a8d9f7c4b 100755 --- a/test.sh +++ b/test.sh @@ -17,8 +17,12 @@ else else export NODE_PATH=$NODE_PATH:$(pwd)/dist/all/:$(pwd)/dist/tools/ fi + echo "Compiling tools..." $(npm bin)/tsc -p tools + if [[ $1 == 'node' ]]; then + # Note: .metadata.json files are needed for the language service tests! + echo "Creating .metadata.json files..." + node dist/tools/@angular/tsc-wrapped/src/main -p modules + fi node dist/tools/tsc-watch/ $1 watch fi - -