-
Notifications
You must be signed in to change notification settings - Fork 1
Add test for ngcc #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
$ bazel test //packages/compiler-cli/test/ngcc This commit adds ngcc_spec.ts which sets up a test environment that includes ngc-compiled versions of @angular/core and @angular/common, and invokes ngcc against @angular/common. It's a starting point for additional ngcc testing.
@@ -10,6 +10,7 @@ ts_library( | |||
deps = [ | |||
"//packages/compiler", | |||
"//packages/compiler-cli", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed these two deps as they are not needed for testing ngcc right now and it makes the compilation more compilicated[sic]!
srcs = glob([ | ||
"*.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? Doesn't **/*.ts
match top-level files as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. Perhaps it ensures that the top level source files are included first?
@@ -18,7 +19,8 @@ jasmine_node_test( | |||
name = "ngcc", | |||
bootstrap = ["angular/tools/testing/init_node_no_angular_spec.js"], | |||
data = [ | |||
"//packages/compiler-cli/test/ngcc/fake_core:npm_package", | |||
"//packages/core:npm_package", | |||
"//packages/common:npm_package", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alxhub - including these dependencies makes the incremental much slower as they appear to be somewhat rebuilt every time... in particular the Angular Compiler seems to be running on them every build. This means that ~800 targets are built rather than ~13.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR implements a Bazel test
ngcc_spec.ts
which verifies functionality ofngcc
.