Skip to content

Commit 54d475c

Browse files
committed
chore: add app test
1 parent 52f20ab commit 54d475c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/__tests__/App.test.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from "react"
2+
import { render } from "ink-testing-library"
3+
import { test, expect, describe, mock } from "bun:test"
4+
import { App } from "../App"
5+
import { AgentStore } from "../store"
6+
7+
mock.module("../hooks/useConfig", () => ({
8+
useConfig: mock(() => {}),
9+
}))
10+
11+
describe("App", () => {
12+
test("should render null when not booted", () => {
13+
const { lastFrame } = render(
14+
<AgentStore.Provider>
15+
<App />
16+
</AgentStore.Provider>
17+
)
18+
19+
expect(lastFrame()).toBe("")
20+
})
21+
})

0 commit comments

Comments
 (0)