gleam: Detect tests using describe
API for Startest (#12221)
This PR updates the Gleam runnables to detect tests using the `describe` API in Startest. This isn't entirely functional yet, as it is still just uses the test function name to run the tests (which Startest doesn't yet support). Release Notes: - N/A
This commit is contained in:
parent
e15b902974
commit
e0cfba43aa
1 changed files with 14 additions and 0 deletions
|
@ -4,3 +4,17 @@
|
||||||
(function name: (_) @run
|
(function name: (_) @run
|
||||||
(#match? @run ".*_test$"))
|
(#match? @run ".*_test$"))
|
||||||
) @gleam-test
|
) @gleam-test
|
||||||
|
|
||||||
|
; `describe` API for Startest.
|
||||||
|
(
|
||||||
|
(function_call
|
||||||
|
function: (_) @name
|
||||||
|
(#any-of? @name "describe" "it")
|
||||||
|
arguments: (arguments
|
||||||
|
.
|
||||||
|
(argument
|
||||||
|
value: (string (quoted_content) @run)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) @gleam-test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue