Skip to content

Commit

Permalink
Fix problem matchers for the test task in VS Code (#358)
Browse files Browse the repository at this point in the history
Since "npm test" runs both TS Compiler and tslint, the output can
contain compilation and linting errors.

This commit is configuring problem matchers for the "run all tests" task
to correctly pick up errors reported by tsc and tslint and list them
in "problems" window.

Note: the tslint5 problem matcher is contributed by the VSCode extension
vscode-tslint (maintained by Microsoft).
  • Loading branch information
bajtos authored and raymondfeng committed Jun 9, 2017
1 parent 8c69f5c commit 25b95f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"test",
"-s"
],
"problemMatcher": ["$tsc", "$tslint5"],
"isTestCommand": true
},
// running example-codehub tests
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"coverage": "open coverage/index.html",
"lint": "tslint -c tslint.full.json --project tsconfig.json --type-check",
"lint:fix": "npm run lint -- --fix",
"clean": "lerna run clean",
"build": "lerna run build",
"clean": "lerna run --loglevel=silent clean",
"build": "lerna run --loglevel=silent build",
"pretest": "npm run build",
"test": "nyc mocha --opts test/mocha.opts \"packages/*/test/**/*.ts\"",
"posttest": "npm run lint"
Expand Down

0 comments on commit 25b95f9

Please sign in to comment.