test(language-service): Improve integration test (#28168)
The current integration test for language service involves piping the results of one process to another using Unix pipes. This makes the test hard to debug, and hard to configure. This commit refactors the integration test to use regular Jasmine scaffolding. More importantly, it tests the way the language service will actually be installed by end users. Users would not have to add `@angular/language-service` to the plugins section in tsconfig.json Instead, all they need to do is install the *extension* from the VS Code Marketplace and Angular Language Service will be loaded as a global plugin. PR Close #28168
This commit is contained in:

committed by
Alex Rickabaugh

parent
5a582a8afd
commit
f8ad4d1e99
22
integration/language_service_plugin/generate.ts
Normal file
22
integration/language_service_plugin/generate.ts
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @fileOverview
|
||||
* This file serves as the entry point for generating goldens file for the
|
||||
* language service integration test. It expects each golden file that needs
|
||||
* to be generated to be passed in as command line arguments.
|
||||
* For example, to generate golden file for the 'configure' request, run
|
||||
* `yarn golden configure.json`.
|
||||
* To generate multiple golden files, run
|
||||
* `yarn golden configure.json completionInfo.json`.
|
||||
*
|
||||
* This is different from just running `yarn jasmine test.js` because this
|
||||
* allows passing in arbitrary arguments.
|
||||
*/
|
||||
|
||||
import Jasmine = require('jasmine');
|
||||
|
||||
function main() {
|
||||
const jasmine = new Jasmine({});
|
||||
jasmine.execute(['test.js']);
|
||||
}
|
||||
|
||||
main()
|
Reference in New Issue
Block a user