angular-cn/packages/language-service
Keen Yee Liau 58ea040570 test(language-service): add new mock host for testing ivy (#36879)
This commit adds a new mock host for testing the ivy language service.

Unlike the existing mock_host which mocks the LanguageServiceHost, the
Ivy mock host mocks just the filesystem interface, aka ts.ServerHost.

This is because Ivy language service requires an actual Project to
perform operations like adding synthetic typecheck files to the project,
and by extension, to the ts.Program. These requirements make the existing
mock host unsuitable to be reused.

This new testing structure also improves test performance, because the
old mock host copies (it actually creates symlinks, but still that's
relatively expensive due to the sheer number of files involved) all
@angular/* packages along with the typescript package to a temporary
node_modules directory. This is done every time setup() is called.
Instead, this new mock host just loads them from a pre-determined path
in Bazel runfiles.

PR Close #36879
2020-05-04 12:47:15 -07:00
..
bundles build: Add entry point for Ivy language service (#36864) 2020-05-01 10:02:03 -07:00
ivy test(language-service): add new mock host for testing ivy (#36879) 2020-05-04 12:47:15 -07:00
src test(language-service): do not invalidate @angular/core (#36845) 2020-04-29 14:27:33 -07:00
test test(language-service): add new mock host for testing ivy (#36879) 2020-05-04 12:47:15 -07:00
BUILD.bazel build: Add entry point for Ivy language service (#36864) 2020-05-01 10:02:03 -07:00
index.ts build: roll up to named .js files rather than 'index.js' (#19190) 2017-09-19 16:59:18 -07:00
language-service.ts refactor(language-service): clean up and exports and consolidate types (#36533) 2020-04-14 10:17:43 -07:00
package.json build(packaging): add repository.directory field to package.jsons (#27544) 2020-02-25 13:12:45 -08:00