Skip to content

Commit de528aa

Browse files
committed
#RI-6597 - add test
1 parent 987fb68 commit de528aa

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

redisinsight/ui/src/components/query/query-card/QueryCard.spec.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,24 @@ describe('QueryCard', () => {
158158
expect(queryCliResultEl).toBeInTheDocument()
159159
})
160160

161+
it('should render properly result when it has pure number', () => {
162+
const { getByTestId } = render(
163+
<QueryCard
164+
{...instance(mockedProps)}
165+
resultsMode={ResultsMode.GroupMode}
166+
result={[{
167+
status: CommandExecutionStatus.Success,
168+
response: 1,
169+
}]}
170+
isOpen
171+
command="del key"
172+
/>
173+
)
174+
const queryCliResultEl = getByTestId('query-cli-result')
175+
176+
expect(queryCliResultEl.textContent).toBe('(integer) 1')
177+
})
178+
161179
it('should render QueryCardCliResult when result reached response size threshold even w/o flag', () => {
162180
const { queryByTestId } = render(
163181
<QueryCard

0 commit comments

Comments
 (0)