Created
September 16, 2016 22:02
-
-
Save ianks/f0be0f48406498b72787904bde270657 to your computer and use it in GitHub Desktop.
Mocha tasks.js for vscode with problemMatcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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