Skip to content

Commit 13bda8d

Browse files
Refactor historyCount test to clarify default value behavior and add explicit check for zero.
1 parent de8df94 commit 13bda8d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/store/agent/slices/chat/selectors/chatConfig.test.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('agentChatConfigSelectors', () => {
8686
});
8787

8888
describe('historyCount', () => {
89-
it('should return undefined when historyCount is not defined', () => {
89+
it('should return default value when historyCount is not defined', () => {
9090
const state = createMockState();
9191
expect(agentChatConfigSelectors.historyCount(state)).toBe(8);
9292
});
@@ -95,6 +95,11 @@ describe('agentChatConfigSelectors', () => {
9595
const state = createMockState({ historyCount: 20 });
9696
expect(agentChatConfigSelectors.historyCount(state)).toBe(20);
9797
});
98+
99+
it('should return 0 when historyCount is explicitly set to 0', () => {
100+
const state = createMockState({ historyCount: 0 });
101+
expect(agentChatConfigSelectors.historyCount(state)).toBe(0);
102+
});
98103
});
99104

100105
describe('agentSearchMode', () => {

0 commit comments

Comments
 (0)