Skip to content

Instantly share code, notes, and snippets.

@ianks
Created September 16, 2016 22:02
Show Gist options
  • Save ianks/f0be0f48406498b72787904bde270657 to your computer and use it in GitHub Desktop.
Save ianks/f0be0f48406498b72787904bde270657 to your computer and use it in GitHub Desktop.
Mocha tasks.js for vscode with problemMatcher
{
"version": "0.1.0",
"command": "mocha",
"isShellCommand": true,
"showOutput": "silent",
"args": [
"--require",
"test/inject.js",
"--reporter",
"tap",
"--colors"
],
"tasks": [
{
"taskName": "mocha:file",
"args": [
"${file}"
],
"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(.*):(\\d+):(\\d+)$",
"file": 1,
"line": 2,
"column": 3
}
]
}
},
{
"taskName": "mocha:suite",
"args": [
"test/**/*Test.ts{,x}"
],
"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(.*):(\\d+):(\\d+)$",
"file": 1,
"line": 2,
"column": 3
}
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment