You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I am currently working on building a language server plugin for custom elements for microsoft FAST . I have a basic example working when running the plugin, but I would like to write unit tests for it so I can work TDD, and more easily spot regressions.
I have functions I would like to test which take the TemplateContext and LineAndCharacter to return CompletionInfo but I need a way to get a TemplateContext from my test tagged templates.
For now I can just manually set up the interface from a raw string as best I as I can during the test, using jest.mock for typescript itself as well as the AST node
Is it possible to change this library to get an instance of StandardTemplateSourceHelper so I can get the TemplateContext myself, or would this not be possible during the unit tests anyway as we are running in jest via node rather than the typescript runtime?
Is there a different way to approach this problem that I am not seeing?
The text was updated successfully, but these errors were encountered:
Hi. I am currently working on building a language server plugin for custom elements for microsoft FAST . I have a basic example working when running the plugin, but I would like to write unit tests for it so I can work TDD, and more easily spot regressions.
I have functions I would like to test which take the
TemplateContext
andLineAndCharacter
to returnCompletionInfo
but I need a way to get aTemplateContext
from my test tagged templates.jest.mock
fortypescript
itself as well as the AST nodeStandardTemplateSourceHelper
so I can get theTemplateContext
myself, or would this not be possible during the unit tests anyway as we are running in jest via node rather than the typescript runtime?The text was updated successfully, but these errors were encountered: