https://github.com/zed-industries/zed/assets/62463826/2912c940-bd00-483d-9ce7-df1a2539560a Release Notes: - Added runnable tests for JavaScript & Typescript files. - Added task to run selected javascript code.
15 lines
395 B
Scheme
15 lines
395 B
Scheme
; Add support for (node:test, bun:test and Jest) runnable
|
|
; Function expression that has `it`, `test` or `describe` as the function name
|
|
(
|
|
(call_expression
|
|
function: (_) @_name
|
|
(#any-of? @_name "it" "test" "describe")
|
|
arguments: (
|
|
arguments . (string
|
|
(string_fragment) @run
|
|
)
|
|
)
|
|
) @js-test
|
|
(#set! tag js-test)
|
|
)
|