Created
August 13, 2018 17:19
-
-
Save forest/2f94cbe8d546a481aa6571e7ea0dbef9 to your computer and use it in GitHub Desktop.
Running Elixir Tests in Visual Studio Code/ElixirLS
This file contains hidden or 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
{ | |
"key": "alt+t", | |
"command": "workbench.action.tasks.runTask", | |
"args": "mix test" | |
} |
This file contains hidden or 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": "mix test", | |
"type": "shell", | |
"command": "mix", | |
"args": ["test", "--color", "--trace"], | |
"options": { | |
"cwd": "${workspaceRoot}", | |
"requireFiles": [ | |
"test/**/test_helper.exs", | |
"test/**/*_test.exs" | |
] | |
}, | |
"problemMatcher": "$mixTestFailure" | |
}, | |
{ | |
"label": "mix test file", | |
"type": "shell", | |
"command": "mix", | |
"args": [ | |
"test", | |
"${relativeFile}", | |
"--color", | |
"--trace" | |
], | |
"options": { | |
"cwd": "${workspaceRoot}", | |
"requireFiles": [ | |
"test/**/test_helper.exs", | |
"test/**/*_test.exs" | |
] | |
}, | |
"problemMatcher": "$mixTestFailure" | |
}, | |
{ | |
"label": "mix test focused", | |
"type": "shell", | |
"command": "mix", | |
"args": [ | |
"test", | |
"${relativeFile}:${lineNumber}", | |
"--color", | |
"--trace" | |
], | |
"options": { | |
"cwd": "${workspaceRoot}", | |
"requireFiles": [ | |
"test/**/test_helper.exs", | |
"test/**/*_test.exs" | |
] | |
}, | |
"problemMatcher": "$mixTestFailure" | |
}, | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To enable "rerun last task" command, you can add this to tasks: