Open Almenon opened 4 years ago
nevermind, looks like you can import uri directly from vscode somehow. I get a error loading vscode when I try :(
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.
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