Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T02:55:45.237Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

runnables.scm

53 lines · 1.5 KB · text
1; Add support for (node:test, bun:test and Jest) 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
Served at tenant.openagents/omega Member data and write actions are omitted.