Skip to content

Instantly share code, notes, and snippets.

@tommck
Last active January 20, 2017 16:57
Show Gist options
  • Save tommck/970142d18230da95b38ea7bda042f872 to your computer and use it in GitHub Desktop.
Save tommck/970142d18230da95b38ea7bda042f872 to your computer and use it in GitHub Desktop.
VS Code Task to run "gulp test" and parse jasmine/karma output
{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"args": [
"--no-color"
],
"tasks": [
{
"taskName": "build",
"args": [],
"isBuildCommand": true,
"isWatching": false,
"problemMatcher": [
"$lessCompile",
"$tsc",
"$jshint"
]
},
{
"taskName": "test",
"args": [],
"isTestCommand": true,
"echoCommand": true,
"problemMatcher": {
"owner": "test",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": [
{
"regexp": "(Expected.+\\.)",
"message": 1
},
{
"regexp": "at.+\\s.(.*\\.js):(\\d+):(\\d+)",
"file": 1,
"line": 2,
"column": 3
}
]
}
},
{
"taskName": "test-watch",
"args": [],
"isTestCommand": true,
"isWatching": true,
"echoCommand": true,
"problemMatcher": {
"owner": "test",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": [
{
"regexp": "(Expected.+\\.)",
"message": 1
},
{
"regexp": "at.+\\s.(.*\\.js):(\\d+):(\\d+)",
"file": 1,
"line": 2,
"column": 3
}
],
"watching": {
"activeOnStart": true,
"beginsPattern": "Starting 'test'",
"endsPattern": "Finished 'test'"
}
}
}
]
}
@tommck
Copy link
Author

tommck commented Jan 20, 2017

Added a watcher task as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment