Skip to repository content82 lines · 2.3 KB · text
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T04:11:00.594Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
runnables.scm
1; Add support for (node:test, bun:test, Jest and Deno.test) runnable
2; Function expression that has `it`, `test` or `describe` as the function name
3; Also matches direct modifiers: .skip, .todo, .only, .failing (Jest, Bun, Vitest)
4((call_expression
5 function: [
6 (identifier) @_name
7 (member_expression
8 object: [
9 (identifier) @_name
10 (member_expression
11 object: (identifier) @_name)
12 ])
13 ]
14 (#any-of? @_name "it" "test" "describe" "context" "suite")
15 arguments: (arguments
16 .
17 [
18 (string
19 (string_fragment) @run)
20 (identifier) @run
21 ])) @_js-test
22 (#set! tag js-test))
23
24; Parameterized and conditional tests. Docs per runner:
25; Jest: https://jestjs.io/docs/api#testeachtablename-fn-timeout
26; Vitest: https://vitest.dev/api/
27; Bun: https://bun.sh/docs/test/writing-tests#test-modifiers
28((call_expression
29 function: (call_expression
30 function: (member_expression
31 object: [
32 (identifier) @_name
33 (member_expression
34 object: (identifier) @_name)
35 ]
36 property: (property_identifier) @_property)
37 (#any-of? @_name "it" "test" "describe" "context" "suite")
38 (#any-of? @_property
39 ; Jest, Bun, Vitest
40 "each"
41 ; Vitest
42 "skipIf" "runIf"
43 ; Bun
44 "if" "todoIf"))
45 arguments: (arguments
46 .
47 [
48 (string
49 (string_fragment) @run)
50 (identifier) @run
51 ])) @_js-test
52 (#set! tag js-test))
53
54; Add support for Deno.test with string names
55((call_expression
56 function: (member_expression
57 object: (identifier) @_namespace
58 property: (property_identifier) @_method)
59 (#eq? @_namespace "Deno")
60 (#eq? @_method "test")
61 arguments: (arguments
62 .
63 [
64 (string
65 (string_fragment) @run @DENO_TEST_NAME)
66 (identifier) @run @DENO_TEST_NAME
67 ])) @_js-test
68 (#set! tag js-test))
69
70; Add support for Deno.test with named function expressions
71((call_expression
72 function: (member_expression
73 object: (identifier) @_namespace
74 property: (property_identifier) @_method)
75 (#eq? @_namespace "Deno")
76 (#eq? @_method "test")
77 arguments: (arguments
78 .
79 (function_expression
80 name: (identifier) @run @DENO_TEST_NAME))) @_js-test
81 (#set! tag js-test))
82