Skip to content

Instantly share code, notes, and snippets.

@leonadler
Forked from aeinbu/tasks.json
Created June 20, 2017 08:38
Show Gist options
  • Save leonadler/8a72a3fa53940cabd63c511a279d5d83 to your computer and use it in GitHub Desktop.
Save leonadler/8a72a3fa53940cabd63c511a279d5d83 to your computer and use it in GitHub Desktop.
Visual Studio Code task for running mocha tests with problem matcher
{
"version": "0.1.0",
"command": "mocha",
"isShellCommand": true,
"showOutput": "silent",
"args": [
"--reporter",
"tap",
"--colors"
],
"tasks": [
{
"taskName": "mocha",
"suppressTaskName": true,
"isTestCommand": true,
"showOutput": "silent",
"problemMatcher": {
"owner": "mocha",
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": [
{
"regexp": "^not\\sok\\s\\d+\\s(.*)$"
},
{
"regexp": "\\s+(.*)$",
"message": 1
},
{
"regexp": "\\s+at\\s(.*)\\s\\((.*):(\\d+):(\\d+)\\)",
"file": 2,
"line": 3,
"column": 4
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment