Created
February 7, 2019 03:02
-
-
Save ngscheurich/705914075c3c09cb5d5c30e6bb08c0f8 to your computer and use it in GitHub Desktop.
My VS Code Test Tasks for Elixir
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", | |
"command": "mix", | |
"group": "build", | |
"args": ["compile"], | |
"problemMatcher": ["$mixCompileError", "$mixCompileWarning"], | |
"presentation": { | |
"echo": true, | |
"reveal": "always", | |
"focus": false, | |
"panel": "shared" | |
} | |
}, | |
{ | |
"label": "Run All Tests", | |
"command": "mix test", | |
"type": "shell", | |
"group": "test", | |
"problemMatcher": [ | |
"$mixCompileError", | |
"$mixCompileWarning", | |
"$mixTestFailure" | |
], | |
"presentation": { | |
"echo": true, | |
"reveal": "always", | |
"focus": false, | |
"panel": "shared" | |
} | |
}, | |
{ | |
"label": "Test Current File", | |
"command": "mix test ${relativeFile} && echo -n ${relativeFile} > ${workspaceRoot}/.vscode/TEST_LAST", | |
"group": "test", | |
"type": "shell", | |
"problemMatcher": [ | |
"$mixCompileError", | |
"$mixCompileWarning", | |
"$mixTestFailure" | |
], | |
"presentation": { | |
"echo": true, | |
"reveal": "always", | |
"focus": false, | |
"panel": "shared" | |
} | |
}, | |
{ | |
"label": "Run Nearest Test", | |
"command": "mix test ${relativeFile}:${lineNumber} && echo -n ${relativeFile}:${lineNumber} > ${workspaceRoot}/.vscode/TEST_LAST", | |
"group": "test", | |
"type": "shell", | |
"problemMatcher": [ | |
"$mixCompileError", | |
"$mixCompileWarning", | |
"$mixTestFailure" | |
], | |
"presentation": { | |
"echo": true, | |
"reveal": "always", | |
"focus": false, | |
"panel": "shared" | |
} | |
}, | |
{ | |
"label": "Debug Nearest Test", | |
"command": "iex -S mix test ${relativeFile}:${lineNumber} && echo -n ${relativeFile}:${lineNumber} > ${workspaceRoot}/.vscode/TEST_LAST", | |
"type": "shell", | |
"group": "test", | |
"problemMatcher": [ | |
"$mixCompileError", | |
"$mixCompileWarning", | |
"$mixTestFailure" | |
], | |
"presentation": { | |
"echo": true, | |
"reveal": "always", | |
"focus": true, | |
"panel": "new" | |
} | |
}, | |
{ | |
"label": "Run Last Test", | |
"command": "mix test $(cat ${workspaceRoot}/.vscode/TEST_LAST)", | |
"type": "shell", | |
"group": "test", | |
"problemMatcher": [ | |
"$mixCompileError", | |
"$mixCompileWarning", | |
"$mixTestFailure" | |
], | |
"presentation": { | |
"echo": true, | |
"reveal": "always", | |
"focus": false, | |
"panel": "shared" | |
} | |
}, | |
{ | |
"label": "Debug Last Test", | |
"command": "iex -S mix test $(cat ${workspaceRoot}/.vscode/TEST_LAST)", | |
"type": "shell", | |
"group": "test", | |
"problemMatcher": [ | |
"$mixCompileError", | |
"$mixCompileWarning", | |
"$mixTestFailure" | |
], | |
"presentation": { | |
"echo": true, | |
"reveal": "always", | |
"focus": true, | |
"panel": "new" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment