(t *testing.T)
| 69 | if !ok { |
| 70 | continue |
| 71 | } |
| 72 | if cmd, _ := hm["command"].(string); cmd == command { |
| 73 | n++ |
| 74 | break |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | return n |
| 79 | } |
| 80 | |
| 81 | func expectedCommand(event string) string { |
| 82 | switch event { |
| 83 | case "SessionStart": |
| 84 | return "flow hook session-start" |
| 85 | case "UserPromptSubmit": |
| 86 | return "flow hook user-prompt-submit" |
| 87 | } |
| 88 | return "" |
| 89 | } |
| 90 | |
| 91 | // withTempHome redirects $HOME to a tempdir for the duration of the test. |
| 92 | func withTempHome(t *testing.T) string { |
nothing calls this directly
no test coverage detected