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
19 lines
487 B
JSON
19 lines
487 B
JSON
{
|
|
"//00": "This file is used for both IDE and the actual Project creation in Ivy language service for testing purpose",
|
|
"compilerOptions": {
|
|
"lib": ["es2015", "dom"],
|
|
"strict": true,
|
|
"experimentalDecorators": true,
|
|
"moduleResolution": "node",
|
|
"target": "es2015",
|
|
"baseUrl": "../../../..",
|
|
"paths": {
|
|
"@angular/*": ["packages/*"]
|
|
}
|
|
},
|
|
"angularCompilerOptions": {
|
|
"fullTemplateTypeCheck": true,
|
|
"strictInjectionParameters": true
|
|
}
|
|
}
|