elixir: Add support for property macro in runnables (#16985)

Closes #16984 

Release Notes:

- Added support for `property` tests in runnables for Elixir ([#16984](https://github.com/zed-industries/zed/issues/16984))
This commit is contained in:
Christoph Schmatzler 2024-08-28 10:11:35 +02:00 committed by GitHub
parent 4ec1f29df0
commit 81eb594037
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,19 +1,19 @@
; Macros `describe` and `test`. ; Macros `describe`, `test` and `property`.
; This matches the ExUnit test style. ; This matches the ExUnit test style.
( (
(call (call
target: (identifier) @run (#any-of? @run "describe" "test") target: (identifier) @run (#any-of? @run "describe" "test" "property")
) @_elixir-test ) @_elixir-test
(#set! tag elixir-test) (#set! tag elixir-test)
) )
; Modules containing at least one `describe` or `test`. ; Modules containing at least one `describe`, `test` and `property`.
; This matches the ExUnit test style. ; This matches the ExUnit test style.
( (
(call (call
target: (identifier) @run (#eq? @run "defmodule") target: (identifier) @run (#eq? @run "defmodule")
(do_block (do_block
(call target: (identifier) @_keyword (#any-of? @_keyword "describe" "test")) (call target: (identifier) @_keyword (#any-of? @_keyword "describe" "test" "property"))
) )
) @_elixir-module-test ) @_elixir-module-test
(#set! tag elixir-module-test) (#set! tag elixir-module-test)