MCPcopy Create free account
hub / github.com/github/gh-aw / TestDetectRuntimeFromCommand

Function TestDetectRuntimeFromCommand

pkg/workflow/runtime_setup_test.go:16–160  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func TestDetectRuntimeFromCommand(t *testing.T) {
17 tests := []struct {
18 name string
19 command string
20 expected []string // Expected runtime IDs
21 }{
22 {
23 name: "bun command",
24 command: "bun install",
25 expected: []string{"bun"},
26 },
27 {
28 name: "bunx command",
29 command: "bunx tsc",
30 expected: []string{"bun"},
31 },
32 {
33 name: "npm install command",
34 command: "npm install",
35 expected: []string{"node"},
36 },
37 {
38 name: "npx command",
39 command: "npx playwright test",
40 expected: []string{"node"},
41 },
42 {
43 name: "python command",
44 command: "python script.py",
45 expected: []string{"python"},
46 },
47 {
48 name: "pip install",
49 command: "pip install package",
50 expected: []string{"python"},
51 },
52 {
53 name: "uv command",
54 command: "uv pip install package",
55 expected: []string{"uv"},
56 },
57 {
58 name: "uvx command",
59 command: "uvx ruff check",
60 expected: []string{"uv"},
61 },
62 {
63 name: "go command",
64 command: "go build",
65 expected: []string{"go"},
66 },
67 {
68 name: "gh aw command",
69 command: "gh aw add githubnext/agentics",
70 expected: []string{"gh-aw"},
71 },
72 {
73 name: "ruby command",

Callers

nothing calls this directly

Calls 4

detectRuntimeFromCommandFunction · 0.85
getRequirementIDsFunction · 0.85
RunMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected