2020-01-22 15:54:16 -05:00
|
|
|
# Debugging the `components-repo-unit-tests` job
|
2019-08-14 12:20:39 -04:00
|
|
|
|
|
|
|
Currently all changes to Ivy are validated against the test suite of the
|
2020-01-22 15:54:16 -05:00
|
|
|
`angular/components` repository. In order to debug the `components-repo-unit-tests` CI
|
2019-08-14 12:20:39 -04:00
|
|
|
job, the following steps can be used:
|
|
|
|
|
2019-11-14 19:56:55 -05:00
|
|
|
1\) Build the Ivy package output by running `node ./scripts/build-ivy-npm-packages.js` in
|
2019-08-14 12:20:39 -04:00
|
|
|
the `angular/angular` repo.
|
|
|
|
|
|
|
|
2\) Clone the `angular/components` repository if not done yet ([quick link to repo](https://github.com/angular/components)).
|
|
|
|
|
2020-01-22 15:54:16 -05:00
|
|
|
3\) Set up the package output in the `angular/components` repository by running the following
|
2019-08-14 12:20:39 -04:00
|
|
|
command in the `angular/angular` repo:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
node ./scripts/ci/update-deps-to-dist-packages.js {COMPONENTS_REPO}/package.json ./dist/packages-dist-ivy-aot
|
|
|
|
```
|
|
|
|
|
2020-01-22 15:54:16 -05:00
|
|
|
4\) Switch into the `angular/components` repository and run the tests by using the
|
2019-08-14 12:20:39 -04:00
|
|
|
following command:
|
|
|
|
|
|
|
|
```bash
|
2019-11-22 15:07:29 -05:00
|
|
|
yarn test --deleted_packages=//src/dev-app --config=ivy
|
2019-08-14 12:20:39 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
### Running tests for individual entry-points
|
|
|
|
|
|
|
|
The `yarn test` script from the `components` repository runs all tests in the project.
|
|
|
|
This is sometimes not desired because it involves building and testing of all packages
|
|
|
|
and entry-points. Running tests for an individual entry-point is possible by explicitly
|
|
|
|
selecting a given test target.
|
|
|
|
|
|
|
|
Here is an example of commands that run individual test targets. Note that it is
|
2019-11-22 15:07:29 -05:00
|
|
|
**important** to specify the `--config=ivy` flag in order to run tests with Ivy.
|
2019-11-14 19:56:55 -05:00
|
|
|
|
2019-08-14 12:20:39 -04:00
|
|
|
```bash
|
2019-11-22 15:07:29 -05:00
|
|
|
yarn bazel test --config=ivy src/material/slider:unit_tests
|
|
|
|
yarn bazel test --config=ivy src/cdk/a11y:unit_tests
|
|
|
|
yarn bazel test --config=ivy src/material/toolbar:unit_tests
|
2019-11-14 19:56:55 -05:00
|
|
|
```
|