mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
elixir: Add runnable tasks (#12526)
Release Notes: - Added runnable tasks to Elixir tests (modules, `describe` and `test` blocks) https://github.com/zed-industries/zed/assets/7737375/06f1b4cb-0364-4c30-982d-6dda3193b5d2
This commit is contained in:
parent
d12b8c3945
commit
a6e0c8aca1
20
extensions/elixir/languages/elixir/runnables.scm
Normal file
20
extensions/elixir/languages/elixir/runnables.scm
Normal file
@ -0,0 +1,20 @@
|
||||
; Macros `describe` and `test`.
|
||||
; This matches the ExUnit test style.
|
||||
(
|
||||
(call
|
||||
target: (identifier) @run (#any-of? @run "describe" "test")
|
||||
) @_elixir-test
|
||||
(#set! tag elixir-test)
|
||||
)
|
||||
|
||||
; Modules containing at least one `describe` or `test`.
|
||||
; This matches the ExUnit test style.
|
||||
(
|
||||
(call
|
||||
target: (identifier) @run (#eq? @run "defmodule")
|
||||
(do_block
|
||||
(call target: (identifier) @_keyword (#any-of? @_keyword "describe" "test"))
|
||||
)
|
||||
) @_elixir-module-test
|
||||
(#set! tag elixir-module-test)
|
||||
)
|
@ -13,12 +13,14 @@
|
||||
{
|
||||
"label": "mix test $ZED_RELATIVE_FILE",
|
||||
"command": "mix",
|
||||
"args": ["test", "$ZED_RELATIVE_FILE"]
|
||||
"args": ["test", "$ZED_RELATIVE_FILE"],
|
||||
"tags": ["elixir-module-test"]
|
||||
},
|
||||
{
|
||||
"label": "mix test $ZED_RELATIVE_FILE:$ZED_ROW",
|
||||
"command": "mix",
|
||||
"args": ["test", "$ZED_RELATIVE_FILE:$ZED_ROW"]
|
||||
"args": ["test", "$ZED_RELATIVE_FILE:$ZED_ROW"],
|
||||
"tags": ["elixir-test"]
|
||||
},
|
||||
{
|
||||
"label": "Elixir: break line",
|
||||
|
Loading…
Reference in New Issue
Block a user