fix(table chart): render bigint value in a raw mode (#34556)

This commit is contained in:
JUST.in DO IT
2025-08-05 13:11:28 -07:00
committed by GitHub
parent d843fef2ce
commit 8700a0b939
3 changed files with 47 additions and 2 deletions

View File

@@ -324,6 +324,27 @@ describe('plugin-chart-table', () => {
expect(cells[4]).toHaveTextContent('$ 2.47k');
});
it('render data with a bigint value in a raw record mode', () => {
render(
ProviderWrapper({
children: (
<TableChart
{...transformProps(testData.bigint)}
sticky={false}
isRawRecords
/>
),
}),
);
const cells = document.querySelectorAll('td');
expect(document.querySelectorAll('th')[0]).toHaveTextContent('name');
expect(document.querySelectorAll('th')[1]).toHaveTextContent('id');
expect(cells[0]).toHaveTextContent('Michael');
expect(cells[1]).toHaveTextContent('4312');
expect(cells[2]).toHaveTextContent('John');
expect(cells[3]).toHaveTextContent('1234567890123456789');
});
it('render raw data', () => {
const props = transformProps({
...testData.raw,