Running tests in VSCode

While we’re looking forward to the release of encore’s VS Code extension :smiley:, there is a simple trick to make tests runnable from the “Testing” pane using plain Go for VS Code extension.
As it is possible to set “Alternate Tools” for the Go extension and encore test has the same syntax as go test all you need is to create a simple script a script that passes the test command to encore and the rest to go binary:


if [ $1 = 'test' ]
    encore $@
    go $@

and use it in your settings.json:

"go.alternateTools": {
    "go": "~/"

Alas, I haven’t yet found the right hack to debug them, has anyone?