Templates/NewPowerShellScriptModule/editor/VSCode/tasks.json

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "windows": {
        "options": {
            "shell": {
                "executable": "powershell.exe",
                "args": [ "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command" ]
            }
        }
    },
    "linux": {
        "options": {
            "shell": {
                "executable": "/usr/bin/pwsh",
                "args": [ "-NoProfile", "-Command" ]
            }
        }
    },
    "osx": {
        "options": {
            "shell": {
                "executable": "/usr/local/bin/pwsh",
                "args": [ "-NoProfile", "-Command" ]
            }
        }
    },
    "tasks": [
        {
            "label": "Run tests",
            "type": "shell",
            "group": "test",
            "command": "Invoke-Pester -Script test -PesterOption @{IncludeVSCodeMarker=$true}",
            "problemMatcher": [ "$pester" ]
        }
    ]
}