@abacus-ai/cli 2.0.0-canary.0 → 2.0.0-canary.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/index.mjs +825 -577
  2. package/package.json +4 -1
  3. package/.oxlintrc.json +0 -8
  4. package/resources/abacus.ico +0 -0
  5. package/resources/entitlements.plist +0 -9
  6. package/src/__e2e__/README.md +0 -196
  7. package/src/__e2e__/agent-interactions.e2e.test.tsx +0 -61
  8. package/src/__e2e__/cli-commands.e2e.test.tsx +0 -77
  9. package/src/__e2e__/conversation-throttle.e2e.test.ts +0 -453
  10. package/src/__e2e__/conversation.e2e.test.tsx +0 -56
  11. package/src/__e2e__/diff-preview.e2e.test.tsx +0 -3399
  12. package/src/__e2e__/file-creation.e2e.test.tsx +0 -149
  13. package/src/__e2e__/helpers/test-helpers.ts +0 -450
  14. package/src/__e2e__/keyboard-navigation.e2e.test.tsx +0 -34
  15. package/src/__e2e__/llm-models.e2e.test.ts +0 -402
  16. package/src/__e2e__/mcp/mcp-callback-flow.e2e.test.tsx +0 -71
  17. package/src/__e2e__/mcp/mcp-full-app-ui.e2e.test.tsx +0 -167
  18. package/src/__e2e__/mcp/mcp-ui-rendering.e2e.test.tsx +0 -185
  19. package/src/__e2e__/repl.e2e.test.tsx +0 -78
  20. package/src/__e2e__/shell-compatibility.e2e.test.tsx +0 -76
  21. package/src/__e2e__/theme-mcp.e2e.test.tsx +0 -98
  22. package/src/__e2e__/tool-permissions.e2e.test.tsx +0 -66
  23. package/src/args.ts +0 -22
  24. package/src/components/__tests__/react-compiler.test.tsx +0 -78
  25. package/src/components/__tests__/status-indicator.test.tsx +0 -403
  26. package/src/components/composer/__tests__/bash-runner.test.tsx +0 -263
  27. package/src/components/composer/agent-mode-indicator.tsx +0 -63
  28. package/src/components/composer/bash-runner.tsx +0 -54
  29. package/src/components/composer/commands/default-commands.tsx +0 -615
  30. package/src/components/composer/commands/handler.tsx +0 -59
  31. package/src/components/composer/commands/picker.tsx +0 -273
  32. package/src/components/composer/commands/registry.ts +0 -233
  33. package/src/components/composer/commands/types.ts +0 -33
  34. package/src/components/composer/context.tsx +0 -88
  35. package/src/components/composer/file-mention-picker.tsx +0 -83
  36. package/src/components/composer/help.tsx +0 -44
  37. package/src/components/composer/index.tsx +0 -1006
  38. package/src/components/composer/mentions.ts +0 -57
  39. package/src/components/composer/message-queue.tsx +0 -70
  40. package/src/components/composer/mode-panel.tsx +0 -35
  41. package/src/components/composer/modes/__tests__/bash-handler.test.tsx +0 -755
  42. package/src/components/composer/modes/__tests__/bash-renderer.test.tsx +0 -1108
  43. package/src/components/composer/modes/bash-handler.tsx +0 -132
  44. package/src/components/composer/modes/bash-renderer.tsx +0 -175
  45. package/src/components/composer/modes/default-handlers.tsx +0 -33
  46. package/src/components/composer/modes/index.ts +0 -41
  47. package/src/components/composer/modes/types.ts +0 -21
  48. package/src/components/composer/persistent-shell.ts +0 -283
  49. package/src/components/composer/process.ts +0 -65
  50. package/src/components/composer/types.ts +0 -9
  51. package/src/components/composer/use-mention-search.ts +0 -68
  52. package/src/components/error-boundry.tsx +0 -60
  53. package/src/components/exit-message.tsx +0 -29
  54. package/src/components/expanded-view.tsx +0 -74
  55. package/src/components/file-completion.tsx +0 -127
  56. package/src/components/header.tsx +0 -47
  57. package/src/components/logo.tsx +0 -37
  58. package/src/components/segments.tsx +0 -356
  59. package/src/components/status-indicator.tsx +0 -306
  60. package/src/components/tool-group-summary.tsx +0 -263
  61. package/src/components/tool-permissions/ask-user-question-permission-ui.tsx +0 -312
  62. package/src/components/tool-permissions/diff-preview.tsx +0 -355
  63. package/src/components/tool-permissions/index.ts +0 -5
  64. package/src/components/tool-permissions/permission-options.tsx +0 -375
  65. package/src/components/tool-permissions/permission-preview-header.tsx +0 -57
  66. package/src/components/tool-permissions/tool-permission-ui.tsx +0 -398
  67. package/src/components/tools/agent/ask-user-question.tsx +0 -101
  68. package/src/components/tools/agent/enter-plan-mode.tsx +0 -49
  69. package/src/components/tools/agent/exit-plan-mode.tsx +0 -75
  70. package/src/components/tools/agent/handoff-to-main.tsx +0 -27
  71. package/src/components/tools/agent/subagent.tsx +0 -37
  72. package/src/components/tools/agent/todo-write.tsx +0 -104
  73. package/src/components/tools/browser/close-tab.tsx +0 -58
  74. package/src/components/tools/browser/computer.tsx +0 -70
  75. package/src/components/tools/browser/get-interactive-elements.tsx +0 -54
  76. package/src/components/tools/browser/get-tab-content.tsx +0 -51
  77. package/src/components/tools/browser/navigate-to.tsx +0 -59
  78. package/src/components/tools/browser/new-tab.tsx +0 -60
  79. package/src/components/tools/browser/perform-action.tsx +0 -63
  80. package/src/components/tools/browser/refresh-tab.tsx +0 -43
  81. package/src/components/tools/browser/switch-tab.tsx +0 -58
  82. package/src/components/tools/filesystem/delete-file.tsx +0 -104
  83. package/src/components/tools/filesystem/edit.tsx +0 -220
  84. package/src/components/tools/filesystem/list-dir.tsx +0 -78
  85. package/src/components/tools/filesystem/read-file.tsx +0 -180
  86. package/src/components/tools/filesystem/upload-image.tsx +0 -76
  87. package/src/components/tools/ide/ide-diagnostics.tsx +0 -62
  88. package/src/components/tools/index.ts +0 -91
  89. package/src/components/tools/mcp/mcp-tool.tsx +0 -158
  90. package/src/components/tools/search/fetch-url.tsx +0 -73
  91. package/src/components/tools/search/file-search.tsx +0 -78
  92. package/src/components/tools/search/grep.tsx +0 -90
  93. package/src/components/tools/search/semantic-search.tsx +0 -66
  94. package/src/components/tools/search/web-search.tsx +0 -71
  95. package/src/components/tools/shared/index.tsx +0 -48
  96. package/src/components/tools/shared/zod-coercion.ts +0 -35
  97. package/src/components/tools/terminal/bash-tool-output.tsx +0 -174
  98. package/src/components/tools/terminal/get-terminal-output.tsx +0 -85
  99. package/src/components/tools/terminal/run-in-terminal.tsx +0 -106
  100. package/src/components/tools/types.ts +0 -16
  101. package/src/components/tools.tsx +0 -66
  102. package/src/components/ui/__tests__/divider.test.tsx +0 -61
  103. package/src/components/ui/__tests__/gradient.test.tsx +0 -125
  104. package/src/components/ui/__tests__/input.test.tsx +0 -166
  105. package/src/components/ui/__tests__/select.test.tsx +0 -273
  106. package/src/components/ui/__tests__/shimmer.test.tsx +0 -99
  107. package/src/components/ui/blinking-indicator.tsx +0 -25
  108. package/src/components/ui/divider.tsx +0 -162
  109. package/src/components/ui/gradient.tsx +0 -56
  110. package/src/components/ui/input.tsx +0 -228
  111. package/src/components/ui/select.tsx +0 -151
  112. package/src/components/ui/shimmer.tsx +0 -84
  113. package/src/context/agent-mode.tsx +0 -95
  114. package/src/context/extension-file.tsx +0 -136
  115. package/src/context/network-activity.tsx +0 -45
  116. package/src/context/notification.tsx +0 -62
  117. package/src/context/shell-size.tsx +0 -49
  118. package/src/context/shell-title.tsx +0 -38
  119. package/src/entrypoints/print-mode.ts +0 -312
  120. package/src/entrypoints/repl.tsx +0 -401
  121. package/src/hooks/use-agent.ts +0 -15
  122. package/src/hooks/use-api-client.ts +0 -1
  123. package/src/hooks/use-available-height.ts +0 -8
  124. package/src/hooks/use-cleanup.ts +0 -29
  125. package/src/hooks/use-interrupt-manager.ts +0 -242
  126. package/src/hooks/use-models.ts +0 -22
  127. package/src/index.ts +0 -217
  128. package/src/lib/__tests__/ansi.test.ts +0 -255
  129. package/src/lib/__tests__/cli.test.ts +0 -122
  130. package/src/lib/__tests__/commands.test.ts +0 -325
  131. package/src/lib/__tests__/constants.test.ts +0 -15
  132. package/src/lib/__tests__/focusables.test.ts +0 -25
  133. package/src/lib/__tests__/fs.test.ts +0 -231
  134. package/src/lib/__tests__/markdown.test.tsx +0 -348
  135. package/src/lib/__tests__/mcpCommandHandler.test.ts +0 -173
  136. package/src/lib/__tests__/mcpManagement.test.ts +0 -38
  137. package/src/lib/__tests__/path-paste.test.ts +0 -144
  138. package/src/lib/__tests__/path.test.ts +0 -300
  139. package/src/lib/__tests__/queries.test.ts +0 -39
  140. package/src/lib/__tests__/standaloneMcpService.test.ts +0 -71
  141. package/src/lib/__tests__/text-buffer.test.ts +0 -328
  142. package/src/lib/__tests__/text-utils.test.ts +0 -32
  143. package/src/lib/__tests__/timing.test.ts +0 -78
  144. package/src/lib/__tests__/utils.test.ts +0 -238
  145. package/src/lib/__tests__/vim-buffer-actions.test.ts +0 -154
  146. package/src/lib/ansi.ts +0 -150
  147. package/src/lib/cli-push-server.ts +0 -112
  148. package/src/lib/cli.ts +0 -44
  149. package/src/lib/clipboard.ts +0 -226
  150. package/src/lib/command-utils.ts +0 -93
  151. package/src/lib/commands.ts +0 -270
  152. package/src/lib/constants.ts +0 -3
  153. package/src/lib/extension-connection.ts +0 -181
  154. package/src/lib/focusables.ts +0 -7
  155. package/src/lib/fs.ts +0 -533
  156. package/src/lib/markdown/code-block.tsx +0 -63
  157. package/src/lib/markdown/index.ts +0 -4
  158. package/src/lib/markdown/link.tsx +0 -19
  159. package/src/lib/markdown/markdown.tsx +0 -372
  160. package/src/lib/markdown/types.ts +0 -15
  161. package/src/lib/mcpCommandHandler.ts +0 -121
  162. package/src/lib/mcpManagement.ts +0 -44
  163. package/src/lib/path-paste.ts +0 -185
  164. package/src/lib/path.ts +0 -179
  165. package/src/lib/queries.ts +0 -15
  166. package/src/lib/standaloneMcpService.ts +0 -688
  167. package/src/lib/status-utils.ts +0 -237
  168. package/src/lib/test-utils.tsx +0 -72
  169. package/src/lib/text-buffer.ts +0 -2415
  170. package/src/lib/text-utils.ts +0 -272
  171. package/src/lib/timing.ts +0 -63
  172. package/src/lib/types.ts +0 -295
  173. package/src/lib/utils.ts +0 -182
  174. package/src/lib/vim-buffer-actions.ts +0 -732
  175. package/src/providers/agent.tsx +0 -1075
  176. package/src/providers/api-client.tsx +0 -43
  177. package/src/services/logger.ts +0 -85
  178. package/src/terminal/detection.ts +0 -187
  179. package/src/terminal/exit.ts +0 -279
  180. package/src/terminal/notification.ts +0 -83
  181. package/src/terminal/progress.ts +0 -201
  182. package/src/terminal/setup.ts +0 -797
  183. package/src/terminal/suspend.ts +0 -58
  184. package/src/terminal/types.ts +0 -51
  185. package/src/theme/context.tsx +0 -57
  186. package/src/theme/index.ts +0 -4
  187. package/src/theme/themed.tsx +0 -35
  188. package/src/theme/themes.json +0 -546
  189. package/src/theme/types.ts +0 -110
  190. package/src/tools/types.ts +0 -59
  191. package/src/tools/utils/__tests__/zod-coercion.test.ts +0 -33
  192. package/src/tools/utils/tool-ui-components.tsx +0 -631
  193. package/src/tools/utils/zod-coercion.ts +0 -35
  194. package/tsconfig.json +0 -11
  195. package/tsconfig.node.json +0 -29
  196. package/tsconfig.test.json +0 -27
  197. package/tsdown.config.ts +0 -17
  198. package/vitest.config.ts +0 -76
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@abacus-ai/cli",
3
- "version": "2.0.0-canary.0",
3
+ "version": "2.0.0-canary.10",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "abacusai": "dist/index.mjs"
7
7
  },
8
+ "files": [
9
+ "dist"
10
+ ],
8
11
  "engines": {
9
12
  "node": ">=18"
10
13
  },
package/.oxlintrc.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/oxlint/configuration_schema.json",
3
- "extends": ["../../.oxlintrc.json", "../../node_modules/@codellm/configs/lint/react.json"],
4
- "plugins": ["eslint", "typescript", "unicorn", "oxc", "react", "react-perf"],
5
- "env": {
6
- "node": false // readonly node globals
7
- }
8
- }
Binary file
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <!-- Required for Bun's JIT compilation in standalone executables -->
6
- <key>com.apple.security.cs.allow-jit</key>
7
- <true/>
8
- </dict>
9
- </plist>
@@ -1,196 +0,0 @@
1
- # E2E Tests for TUI
2
-
3
- This directory contains end-to-end tests for the TUI (Terminal User Interface) using `ink-testing-library`.
4
-
5
- ## Test Structure
6
-
7
- ```
8
- src/__e2e__/
9
- ├── helpers/
10
- │ └── test-helpers.ts # Shared test utilities and helpers
11
- ├── repl.e2e.test.tsx # E2E tests for REPL functionality
12
- ├── conversation.e2e.test.tsx # E2E tests for conversation flows
13
- ├── tool-permissions.e2e.test.tsx # E2E tests for tool permissions
14
- ├── cli-commands.e2e.test.tsx # E2E tests for CLI commands (/help, /status, etc.)
15
- ├── agent-interactions.e2e.test.tsx # E2E tests for agent interactions (send, stop, model)
16
- ├── keyboard-navigation.e2e.test.tsx # E2E tests for keyboard navigation (ESC, arrows)
17
- ├── theme-mcp.e2e.test.tsx # E2E tests for theme and MCP menus
18
- └── shell-compatibility.e2e.test.tsx # E2E tests for shell compatibility (bash, zsh, fish)
19
- ```
20
-
21
- ## Running Tests
22
-
23
- The tests need you to set the `ABACUS_API_KEY` and/or `ABACUS_THROTTLED_API_KEY` environment variables. You can get these from the [Abacus AI CLI dashboard](https://abacus.ai/app/abacusai-cli).
24
-
25
- ### Run all tests (unit + e2e)
26
-
27
- ```bash
28
- npm run test
29
- ```
30
-
31
- ### Run only e2e tests
32
-
33
- ```bash
34
- npm run test:e2e
35
- ```
36
-
37
- ### Run only unit tests
38
-
39
- ```bash
40
- npm run test:unit
41
- ```
42
-
43
- ### Watch mode for e2e tests
44
-
45
- ```bash
46
- npm run test:e2e:watch
47
- ```
48
-
49
- ### Run with UI
50
-
51
- ```bash
52
- npm run test:ui
53
- ```
54
-
55
- ### Run with coverage
56
-
57
- ```bash
58
- npm run test:coverage
59
- ```
60
-
61
- ## Writing E2E Tests
62
-
63
- E2E tests use `ink-testing-library` to render the full TUI application and simulate user interactions.
64
-
65
- ### Example Test
66
-
67
- ```typescript
68
- import { renderE2E, simulateText, simulateEnter, waitForFrame } from "./helpers/test-helpers.js";
69
- import React from "react";
70
- import { sleep } from "../lib/utils.js";
71
-
72
- it("should handle user input", async () => {
73
- const { App } = await import("../entrypoints/repl.js");
74
- const config = {
75
- cwd: process.cwd(),
76
- isIndependentMode: false,
77
- };
78
-
79
- const { lastFrame, stdin, unmount } = renderE2E(React.createElement(App, { config } as any));
80
-
81
- // Wait for the app to render
82
- await waitForFrame(lastFrame, (frame) => frame.length > 0, 3000);
83
-
84
- // Simulate user typing
85
- simulateText(stdin, "Hello");
86
- simulateEnter(stdin);
87
-
88
- // Wait for response
89
- await sleep(500);
90
-
91
- // Assert
92
- const frame = lastFrame();
93
- expect(frame).toContain("Hello");
94
-
95
- unmount();
96
- });
97
- ```
98
-
99
- ## Helper Functions
100
-
101
- ### `renderE2E(component)`
102
-
103
- Renders a component for e2e testing, returns test context with `lastFrame()`, `stdin`, `frames`, and `unmount()`.
104
-
105
- ### `simulateText(stdin, text)`
106
-
107
- Simulates typing text character by character.
108
-
109
- ### `simulateEnter(stdin)`
110
-
111
- Simulates pressing Enter key.
112
-
113
- ### `simulateCtrlC(stdin)`
114
-
115
- Simulates pressing Ctrl+C.
116
-
117
- ### `simulateEscape(stdin)`
118
-
119
- Simulates pressing ESC key.
120
-
121
- ### `simulateUpArrow(stdin)`
122
-
123
- Simulates pressing Up Arrow key (for history navigation).
124
-
125
- ### `simulateDownArrow(stdin)`
126
-
127
- Simulates pressing Down Arrow key.
128
-
129
- ### `simulateRightArrow(stdin)`
130
-
131
- Simulates pressing Right Arrow key.
132
-
133
- ### `simulateLeftArrow(stdin)`
134
-
135
- Simulates pressing Left Arrow key.
136
-
137
- ### `waitForFrame(lastFrame, predicate, timeout)`
138
-
139
- Waits for a frame that matches the predicate function.
140
-
141
- ### `mockApiClient()`
142
-
143
- Creates a mock API client for testing.
144
-
145
- ### `mockConfigService()`
146
-
147
- Creates a mock config service for testing.
148
-
149
- ## Best Practices
150
-
151
- 1. **Use `// @vitest-environment node`** at the top of e2e test files to run in Node environment
152
- 2. **Always unmount** after each test to clean up resources
153
- 3. **Use `waitForFrame`** instead of arbitrary timeouts when possible
154
- 4. **Mock external dependencies** like API clients to make tests deterministic
155
- 5. **Test user flows**, not implementation details
156
- 6. **Keep tests focused** - one flow per test
157
- 7. **Use descriptive test names** that explain the user scenario
158
-
159
- ## Differences from Component Tests
160
-
161
- | Aspect | Component Tests | E2E Tests |
162
- | --------------- | --------------------- | ------------------------- |
163
- | **Scope** | Individual components | Full application flow |
164
- | **Environment** | jsdom | Node (with Ink rendering) |
165
- | **Mocking** | Heavy mocking | Minimal mocking |
166
- | **Speed** | Fast | Slower |
167
- | **Focus** | Component behavior | User experience |
168
- | **Location** | `src/lib/__tests__/` | `src/__e2e__/` |
169
-
170
- ## Debugging
171
-
172
- To debug e2e tests, you can:
173
-
174
- 1. Print the current frame:
175
-
176
- ```typescript
177
- console.log(lastFrame());
178
- ```
179
-
180
- 2. Print all frames:
181
-
182
- ```typescript
183
- console.log(frames);
184
- ```
185
-
186
- 3. Add longer timeouts for debugging:
187
-
188
- ```typescript
189
- await waitForFrame(lastFrame, predicate, 30000); // 30 seconds
190
- ```
191
-
192
- 4. Use Vitest UI mode for visual debugging:
193
-
194
- ```bash
195
- npm run test:ui
196
- ```
@@ -1,61 +0,0 @@
1
- import React from "react";
2
- import { describe, it, expect } from "vitest";
3
-
4
- import { App } from "../entrypoints/repl.js";
5
- import { Timing } from "../lib/timing.js";
6
- import {
7
- renderWithProviders,
8
- simulateText,
9
- simulateEnter,
10
- waitForFrame,
11
- } from "./helpers/test-helpers.js";
12
-
13
- describe.concurrent("Agent Interaction E2E Tests", () => {
14
- it("send message and stop agent", async () => {
15
- const timing = new Timing();
16
-
17
- const { lastFrame, stdin, unmount } = renderWithProviders(React.createElement(App, { timing }));
18
-
19
- await waitForFrame(lastFrame, (frame) => frame.length > 0, 8000);
20
- simulateText(stdin, "Build me a tic tac toe game");
21
- simulateEnter(stdin);
22
-
23
- simulateText(stdin, "/stop");
24
- simulateEnter(stdin);
25
-
26
- const frame = lastFrame();
27
- expect(frame.length).toBeGreaterThan(0);
28
-
29
- unmount();
30
- });
31
-
32
- it("change model", async () => {
33
- const timing = new Timing();
34
-
35
- const { lastFrame, stdin, unmount } = renderWithProviders(React.createElement(App, { timing }));
36
-
37
- await waitForFrame(lastFrame, (frame) => frame.length > 0, 5000);
38
- simulateText(stdin, "/model gpt-4");
39
- simulateEnter(stdin);
40
-
41
- const frame = lastFrame();
42
- expect(frame.length).toBeGreaterThan(0);
43
-
44
- unmount();
45
- });
46
-
47
- it("terminal setup command", async () => {
48
- const timing = new Timing();
49
-
50
- const { lastFrame, stdin, unmount } = renderWithProviders(React.createElement(App, { timing }));
51
-
52
- await waitForFrame(lastFrame, (frame) => frame.length > 0, 5000);
53
- simulateText(stdin, "/terminal-setup");
54
- simulateEnter(stdin);
55
-
56
- const frame = lastFrame();
57
- expect(frame.length).toBeGreaterThan(0);
58
-
59
- unmount();
60
- });
61
- });
@@ -1,77 +0,0 @@
1
- import React from "react";
2
- import { describe, it, expect } from "vitest";
3
-
4
- import { App } from "../entrypoints/repl.js";
5
- import { Timing } from "../lib/timing.js";
6
- import {
7
- renderWithProviders,
8
- simulateText,
9
- simulateEnter,
10
- waitForFrame,
11
- } from "./helpers/test-helpers.js";
12
-
13
- describe.concurrent("CLI Commands E2E Tests", () => {
14
- it("/help - should display help information", async () => {
15
- const timing = new Timing();
16
-
17
- const { lastFrame, stdin, unmount } = renderWithProviders(React.createElement(App, { timing }));
18
-
19
- await waitForFrame(lastFrame, (frame) => frame.length > 0, 5000);
20
-
21
- simulateText(stdin, "/help");
22
- simulateEnter(stdin);
23
-
24
- const frame = lastFrame();
25
- expect(frame.length).toBeGreaterThan(0);
26
-
27
- unmount();
28
- });
29
-
30
- it("/version - should display CLI version", async () => {
31
- const timing = new Timing();
32
-
33
- const { lastFrame, stdin, unmount } = renderWithProviders(React.createElement(App, { timing }));
34
-
35
- await waitForFrame(lastFrame, (frame) => frame.length > 0, 5000);
36
-
37
- simulateText(stdin, "/version");
38
- simulateEnter(stdin);
39
-
40
- const frame = lastFrame();
41
- expect(frame.length).toBeGreaterThan(0);
42
-
43
- unmount();
44
- });
45
-
46
- it("/status - should display user status information", async () => {
47
- const timing = new Timing();
48
-
49
- const { lastFrame, stdin, unmount } = renderWithProviders(React.createElement(App, { timing }));
50
-
51
- await waitForFrame(lastFrame, (frame) => frame.length > 0, 5000);
52
-
53
- simulateText(stdin, "/status");
54
- simulateEnter(stdin);
55
-
56
- const frame = lastFrame();
57
- expect(frame.length).toBeGreaterThan(0);
58
-
59
- unmount();
60
- });
61
-
62
- it("/usage - should display usage information", async () => {
63
- const timing = new Timing();
64
-
65
- const { lastFrame, stdin, unmount } = renderWithProviders(React.createElement(App, { timing }));
66
-
67
- await waitForFrame(lastFrame, (frame) => frame.length > 0, 5000);
68
-
69
- simulateText(stdin, "/usage");
70
- simulateEnter(stdin);
71
-
72
- const frame = lastFrame();
73
- expect(frame.length).toBeGreaterThan(0);
74
-
75
- unmount();
76
- });
77
- });