fix(language-service): reset MockHost after every spec instead of creating new LS (#33200)
This commit speeds up the tests by calling `MockHost.reset()` in `beforeEach()` instead of destroying the entire language service and creating a new one. The creation of a new language service instance is expensive due to the need to initialize many core Symbols when creating a new program. This speeds ups the test (on my local machine) from 35 secs to 15 secs. PR Close #33200
This commit is contained in:

committed by
Matias Niemelä

parent
43241a560a
commit
11bf7679a1
@ -13,7 +13,6 @@ ts_library(
|
||||
"//packages/compiler",
|
||||
"//packages/compiler-cli/test:test_utils",
|
||||
"//packages/language-service",
|
||||
"@npm//reflect-metadata",
|
||||
"@npm//typescript",
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user