From e0cfba43aa05ef2b06c9227bde7b40e98e8c3308 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 23 May 2024 17:20:06 -0400 Subject: [PATCH] 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 --- extensions/gleam/languages/gleam/runnables.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/extensions/gleam/languages/gleam/runnables.scm b/extensions/gleam/languages/gleam/runnables.scm index b61df1ceca..ca5ad00e59 100644 --- a/extensions/gleam/languages/gleam/runnables.scm +++ b/extensions/gleam/languages/gleam/runnables.scm @@ -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