angular-cn/packages/language-service/test
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
..
project test(language-service): add new mock host for testing ivy (#36879) 2020-05-04 12:47:15 -07:00
BUILD.bazel build(language-service): make test project a filegroup (#36865) 2020-05-01 10:02:34 -07:00
completions_spec.ts test(language-service): Inline test cases in parsing-cases.ts (#36495) 2020-04-08 12:11:04 -07:00
definitions_spec.ts refactor(language-service): reformat using clang-format (#36426) 2020-04-06 09:29:42 -07:00
diagnostic_messages_spec.ts refactor(language-service): reformat using clang-format (#36426) 2020-04-06 09:29:42 -07:00
diagnostics_spec.ts fix(language-service): properly evaluate types in comparable expressions (#36529) 2020-04-16 16:07:47 -04:00
expression_diagnostics_spec.ts refactor(language-service): reformat using clang-format (#36426) 2020-04-06 09:29:42 -07:00
global_symbols_spec.ts refactor(language-service): reformat using clang-format (#36426) 2020-04-06 09:29:42 -07:00
hover_spec.ts refactor(language-service): reformat using clang-format (#36426) 2020-04-06 09:29:42 -07:00
html_info_spec.ts build: update jasmine to 3.5 (#34625) 2020-04-08 12:10:34 -07:00
language_service_spec.ts refactor(language-service): reformat using clang-format (#36426) 2020-04-06 09:29:42 -07:00
mocks.ts refactor(language-service): clean up and exports and consolidate types (#36533) 2020-04-14 10:17:43 -07:00
reflector_host_spec.ts refactor(language-service): reformat using clang-format (#36426) 2020-04-06 09:29:42 -07:00
test_utils.ts refactor(language-service): reformat using clang-format (#36426) 2020-04-06 09:29:42 -07:00
ts_plugin_spec.ts test(language-service): remove ng-if-cases.ts (#36470) 2020-04-07 11:34:38 -07:00
typescript_host_spec.ts test(language-service): do not invalidate @angular/core (#36845) 2020-04-29 14:27:33 -07:00
typescript_symbols_spec.ts refactor(language-service): clean up and exports and consolidate types (#36533) 2020-04-14 10:17:43 -07:00
utils_spec.ts refactor(language-service): clean up and exports and consolidate types (#36533) 2020-04-14 10:17:43 -07:00