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:
Marshall Bowers 2024-05-23 17:20:06 -04:00 committed by GitHub
parent e15b902974
commit e0cfba43aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,3 +4,17 @@
(function name: (_) @run
(#match? @run ".*_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