Repository navigation
fix #37570 add RELATIVE_FILEPATH snippet variable - #114208
Conversation
|
Johannes Rieken (@jrieken) I attempted to add tests for the new variable into snippetVariables.test.ts but the following imports that I needed were flagged as import violations and prevented the push. I don't know the right way to solve this. |
|
I resolved this by adding |
No, this isn't permitted. To mock services, I would use the mock util. This is an sample of how it is used: With |
|
My concern about providing a mock label service is that I'll naturally make the mock service do what I reckon is the right thing when the RELATIVE_PATH code calls it with options |
|
Well, you aren't writing a test for how a certain label service works but for a snippet variable that should use some instance of that service |
This PR fixes #37570 by adding a new snippet variable
RELATIVE_FILEPATH