docs(language-service): update integration test information (#32269)

The documentation for the langauge service plugin integration test
appears to be stale. Remove section about new versions of TypeScript,
which appear not to be tested, and update the information about
generating and updating goldens to reflect the new way of doing so.
Add information about install deps in the repo root, this directory, and
building Angular before testing.

Also remove trailing whitespace on one line.

PR Close #32269
This commit is contained in:
ayazhafiz 2019-08-22 08:43:13 -05:00 committed by atscott
parent 55eaa5fb6d
commit f209aacbfa
1 changed files with 14 additions and 18 deletions

View File

@ -1,25 +1,21 @@
# Angular Language Service Test # Angular Language Service Test
This directory is an integration test for `@angular/language-service` to ensure This directory is an integration test for `@angular/language-service` to ensure
that various versions of the server can be loaded in the supported versions of that the language service works correctly as a `tsserver` plugin.
TypeScript's language service.
## New supported version of TypeScript To use the tests:
To add a new supported version of TypeScript: - Use `yarn install` to install all dependencies in this directory and in the Angular repo root
directory.
1) Create directory in `typescripts` to hold the new version following the pattern - From the Angular repo root directory, build Angular in the `dist/packages-dist` folder with
of the other versions. `./scripts/build-packages-dist.sh`.
2) Add the directory name to the end of the `TYPESCRIPTS` variable in the - In this directory, run the tests with `yarn test`.
`scripts/env.sh` file.
3) Run `scripts/update_golden.sh` to generate the expected files.
4) Verify the expected output is reasonable by comparing to a known good output
from a previous version.
## Update golden files ## Update golden files
If the expected output needs to be updated run `scripts/update_golden.sh` to If the expected output needs to be updated, run `yarn golden my-golden.json`, replacing
update the expected output of the server. `my-golden.json` with the golden file to be updated. Do not qualify the file with a directory path.
See [generate.ts](./generate.ts) for more information.
## Adding a new fixture ## Adding a new fixture
@ -30,7 +26,7 @@ I also hand modified the input to remove superfluous request.
Once a new fixture is created: Once a new fixture is created:
1) Add the fixture base name (without the .json) to `FIXTURES` in 1) Add the fixture name to `goldens/`
`scripts/env.sh`. 2) Run `yarn golden my-golden.json`, replacing `my-golden.json` with the new fixture name, to
2) Run `scripts/udpate_golden.sh` to produce the expected output files. produce the expected output files.
3) Hand validate the expected output is reasonable. 3) Hand validate that the expected output is reasonable.