diff --git a/integration/ngcc/test-local.sh b/integration/ngcc/debug-test.sh similarity index 65% rename from integration/ngcc/test-local.sh rename to integration/ngcc/debug-test.sh index ce91952303..15b6252cb9 100755 --- a/integration/ngcc/test-local.sh +++ b/integration/ngcc/debug-test.sh @@ -1,5 +1,12 @@ #!/usr/bin/env bash +##### Test Debug Utility ##### +############################## + +# Use this script to run the ngcc integration test locally +# in isolation from the other integration tests. +# This is useful when debugging the ngcc code-base. + set -u -e -o pipefail cd "$(dirname "$0")" diff --git a/integration/ngcc/package.json b/integration/ngcc/package.json index 156054a557..fcc3612f1b 100644 --- a/integration/ngcc/package.json +++ b/integration/ngcc/package.json @@ -4,15 +4,16 @@ "license": "MIT", "dependencies": { "@angular/animations": "file:../../dist/packages-dist/animations", + "@angular/cdk": "^7.0.0-rc.1", "@angular/common": "file:../../dist/packages-dist/common", "@angular/compiler": "file:../../dist/packages-dist/compiler", "@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli", "@angular/core": "file:../../dist/packages-dist/core", "@angular/forms": "file:../../dist/packages-dist/forms", "@angular/http": "file:../../dist/packages-dist/http", + "@angular/material": "7.0.0-rc.1", "@angular/platform-browser": "file:../../dist/packages-dist/platform-browser", "@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic", - "@angular/platform-server": "file:../../dist/packages-dist/platform-server", "@angular/router": "file:../../dist/packages-dist/router", "@types/node": "^9.4.0", "rxjs": "file:../../node_modules/rxjs", diff --git a/integration/ngcc/src/main.ts b/integration/ngcc/src/main.ts index 9ec0192957..2a2b5cf7b1 100644 --- a/integration/ngcc/src/main.ts +++ b/integration/ngcc/src/main.ts @@ -1,9 +1,11 @@ import {Component, NgModule, ɵrenderComponent as renderComponent} from '@angular/core'; import {CommonModule} from '@angular/common'; +import {MatButtonModule} from '@angular/material/button'; + @Component({ selector: 'hello-world', template: ` - +

Hello World

`, }) @@ -13,7 +15,7 @@ class HelloWorld { @NgModule({ declarations: [HelloWorld], - imports: [CommonModule], + imports: [CommonModule, MatButtonModule], }) class Module {} diff --git a/integration/ngcc/test.sh b/integration/ngcc/test.sh index 707df6b0d3..c88adbb4ac 100755 --- a/integration/ngcc/test.sh +++ b/integration/ngcc/test.sh @@ -39,6 +39,8 @@ ivy-ngcc # Now try compiling the app using the ngcc compiled libraries ngc -p tsconfig-app.json -# Did it compile the main.ts correctly? - grep "directives: \[\S*\.NgIf\]" dist/src/main.js +# Did it compile the main.ts correctly (including the ngIf and MatButton directives)? + grep "directives: \[.*\.NgIf.*\]" dist/src/main.js + if [[ $? != 0 ]]; then exit 1; fi + grep "directives: \[.*\.MatButton.*\]" dist/src/main.js if [[ $? != 0 ]]; then exit 1; fi