rokucommunity / vscode-brightscript-language

A Visual Studio Code extension for Roku's BrightScript language
MIT License
104 stars 41 forks source link

[dev enhancement] Actual Uri can be used instead of mock #258

Open Almenon opened 4 years ago

Almenon commented 4 years ago

In https://github.com/rokucommunity/vscode-brightscript-language/blob/master/src/mockVscode.spec.ts it isn't needed to mock uri - I recently VScode offers uri as a seperate library. See https://github.com/microsoft/vscode-uri

Example of how to change to vscode-uri: https://github.com/Almenon/AREPL-vscode/commit/90d933d423d7293883b2c1832bba2b3847718360

Almenon commented 4 years ago

nevermind, looks like you can import uri directly from vscode somehow. I get a error loading vscode when I try :(

TwitchBronBron commented 4 years ago

We mock many parts of vscode because when running the mocha tests, vscode is unavailable. That's because vscode only injects the vscode apj when running the actual editor. Which makes node and CI-driven tests not work since the vscode import will be undefined or fail.

So this is actually a good point, we might as well use the actual Uri object.