angular-cn/packages/language-service/ivy
Keen Yee Liau da79e0433f test(language-service): [ivy] Add mock service to overwrite files (#36923)
Add a mechanism to replace file contents for a specific file. This
allows us to write custom test scenarios in code without modifying the
test project.

Since we are no longer mocking the language service host, the file
overwrite needs to happen via the project service.
Project service manages a set of script infos, and overwriting the files
is a matter of updating the relevant script infos.

Note that the actual project service is wrapped inside a Mock Service.
Tests should not have direct access to the project service. All
manipulations should take place via the Mock Service.

The MockService provides a `reset()` method to undo temporary overwrites
after each test.

PR Close #36923
2020-05-05 17:52:12 -07:00
..
test test(language-service): [ivy] Add mock service to overwrite files (#36923) 2020-05-05 17:52:12 -07:00
BUILD.bazel feat(language-service): [ivy] Parse Angular compiler options (#36922) 2020-05-05 12:01:00 -07:00
language_service.ts feat(language-service): [ivy] Parse Angular compiler options (#36922) 2020-05-05 12:01:00 -07:00
ts_plugin.ts feat(language-service): [ivy] Parse Angular compiler options (#36922) 2020-05-05 12:01:00 -07:00