mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-26 03:33:12 -07:00
test: fix useTips tests
This commit is contained in:
@@ -17,7 +17,9 @@ describe('useTips()', () => {
|
||||
});
|
||||
|
||||
it('should return false and call set(1) if state is undefined', async () => {
|
||||
const { result } = await renderHookWithProviders(() => useTips());
|
||||
const { result } = await renderHookWithProviders(() => useTips(), {
|
||||
allowEmptyFrame: true,
|
||||
});
|
||||
|
||||
expect(result.current.showTips).toBe(true);
|
||||
|
||||
@@ -28,7 +30,9 @@ describe('useTips()', () => {
|
||||
it('should return false and call set(6) if state is 5', async () => {
|
||||
persistentStateMock.setData({ tipsShown: 5 });
|
||||
|
||||
const { result } = await renderHookWithProviders(() => useTips());
|
||||
const { result } = await renderHookWithProviders(() => useTips(), {
|
||||
allowEmptyFrame: true,
|
||||
});
|
||||
|
||||
expect(result.current.showTips).toBe(true);
|
||||
|
||||
@@ -38,7 +42,9 @@ describe('useTips()', () => {
|
||||
it('should return true if state is 10', async () => {
|
||||
persistentStateMock.setData({ tipsShown: 10 });
|
||||
|
||||
const { result } = await renderHookWithProviders(() => useTips());
|
||||
const { result } = await renderHookWithProviders(() => useTips(), {
|
||||
allowEmptyFrame: true,
|
||||
});
|
||||
|
||||
expect(result.current.showTips).toBe(false);
|
||||
expect(persistentStateMock.set).not.toHaveBeenCalled();
|
||||
|
||||
Reference in New Issue
Block a user