6dc884f2ab
This PR changes the integration test to load language service the way it would be loaded in the editor. If the language service is specified in tsconfig, it'd only be loaded for Angular projects. Specifying it as `globalPlugins` loads it unconditionally whenever tsserver is brought up. PR Close #30153 |
||
---|---|---|
.. | ||
goldens | ||
project | ||
.gitignore | ||
README.md | ||
generate.ts | ||
matcher.ts | ||
package.json | ||
test.ts | ||
tsclient.ts | ||
tsconfig.json | ||
yarn.lock |
README.md
Angular Language Service Test
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
TypeScript's language service.
New supported version of TypeScript
To add a new supported version of TypeScript:
- Create directory in
typescripts
to hold the new version following the pattern of the other versions. - Add the directory name to the end of the
TYPESCRIPTS
variable in thescripts/env.sh
file. - Run
scripts/update_golden.sh
to generate the expected files. - Verify the expected output is reasonable by comparing to a known good output from a previous version.
Update golden files
If the expected output needs to be updated run scripts/update_golden.sh
to
update the expected output of the server.
Adding a new fixture
Currently there is no automated way to produce a new fixture. The way the
current fixtures were created was to hack a version of tsserver.js to write the
commands from VSCode
to a file while performing the operation to be tested.
I also hand modified the input to remove superfluous request.
Once a new fixture is created:
- Add the fixture base name (without the .json) to
FIXTURES
inscripts/env.sh
. - Run
scripts/udpate_golden.sh
to produce the expected output files. - Hand validate the expected output is reasonable.