Created
December 20, 2021 13:20
-
-
Save PJUllrich/0ed3eaf81790e6c902a57fc30a857f4a to your computer and use it in GitHub Desktop.
VSCode Tasks for running Elixir tests quickly
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": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Build", | |
"type": "shell", | |
"command": "mix compile", | |
"problemMatcher": ["$mixCompileError", "$mixCompileWarning"], | |
"group": { | |
"kind": "build", | |
"isDefault": true | |
} | |
}, | |
{ | |
"label": "Format Current File", | |
"type": "shell", | |
"command": "mix", | |
"args": ["format", "${relativeFile}"], | |
"options": { | |
"cwd": "${workspaceRoot}" | |
}, | |
"problemMatcher": "$mixTestFailure", | |
"presentation": { | |
"focus": false, | |
"reveal": "never" | |
} | |
}, | |
{ | |
"label": "Run All Tests", | |
"type": "shell", | |
"command": "mix", | |
"args": ["test"], | |
"options": { | |
"cwd": "${workspaceRoot}" | |
}, | |
"problemMatcher": [ | |
"$mixCompileError", | |
"$mixCompileWarning", | |
"$mixTestFailure" | |
], | |
"group": { | |
"kind": "test", | |
"isDefault": true | |
}, | |
"presentation": { | |
"focus": true | |
} | |
}, | |
{ | |
"label": "Run Current Tests", | |
"type": "shell", | |
"command": "mix", | |
"args": ["test", "${relativeFile}"], | |
"options": { | |
"cwd": "${workspaceRoot}" | |
}, | |
"problemMatcher": [ | |
"$mixCompileError", | |
"$mixCompileWarning", | |
"$mixTestFailure" | |
], | |
"presentation": { | |
"focus": true | |
} | |
}, | |
{ | |
"label": "Run Focused Test", | |
"type": "shell", | |
"command": "mix", | |
"args": ["test", "${relativeFile}:${lineNumber}"], | |
"options": { | |
"cwd": "${workspaceRoot}" | |
}, | |
"problemMatcher": [ | |
"$mixCompileError", | |
"$mixCompileWarning", | |
"$mixTestFailure" | |
], | |
"presentation": { | |
"focus": true | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment