skitscript / extension-vscode

MIT License
0 stars 0 forks source link

Skitscript Extension (VS Code) Continuous Integration License Renovate enabled Visual Studio Marketplace Version

Adds support for Skitscript documents to Visual Studio Code.

Features

Installation

You may be prompted to install this extension on opening a file with an extension of .skitscript.

Alternatively, click here to install it in your local copy of Visual Studio Code.

Test notes

Although this project has test coverage, that test coverage does not truly use TypeScript.

To explain, a vscode module is able to be imported by all extensions running within Visual Studio Code. There is also a @types/vscode package available from NPM describing what that module provides.

It is not, however, possible to install, require or import the vscode module outside of the Visual Studio Code hosting environment, so references to concrete types within (Diagnostic, Range, etc.) are unresolvable during a test.

The only workaround for this has been to use rewire to inject a fake vscode module and use that, while using types from @types/vscode. This then requires a large amount of unsafe type casts to compile at all, to the point at which TypeScript isn't doing much for the test code, only that of the extension itself.

This has led to tests which are very unrealistic and likely fragile, but I do not see a viable alternative given the vscode module situation.