This update introduces some utilities in acdlTestUtils.ts that offer an easier way to write unit tests for the ACDL language server. ACDL test files can be added to the test/acdlServer/mockACDL/skill-package/conversations directory, and rapid tests can be written against those files. All you need to give the utility is the name of a test ACDL file and a snippet of unique text within that ACDL file to indicate the position of the user's cursor. It will dig up what the current hover behavior is at that location and compare it with what the expected hover text is.
The utilities will be expanded in the future to cover autocomplete suggestions and getDefinition requests.
Motivation and Context
Writing a large amount of useful tests for the language server is tedious, this aims to reduce that tedium and get valuable tests more quickly.
Testing
Manual as well as unit tests, all passing.
Screenshots (if appropriate)
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[x] My code follows the code style of this project
[ ] My change requires a change to the documentation
This update introduces some utilities in
acdlTestUtils.ts
that offer an easier way to write unit tests for the ACDL language server. ACDL test files can be added to thetest/acdlServer/mockACDL/skill-package/conversations
directory, and rapid tests can be written against those files. All you need to give the utility is the name of a test ACDL file and a snippet of unique text within that ACDL file to indicate the position of the user's cursor. It will dig up what the current hover behavior is at that location and compare it with what the expected hover text is.The utilities will be expanded in the future to cover autocomplete suggestions and getDefinition requests.
Motivation and Context
Writing a large amount of useful tests for the language server is tedious, this aims to reduce that tedium and get valuable tests more quickly.
Testing
Manual as well as unit tests, all passing.
Screenshots (if appropriate)
Types of changes
Checklist
License