Skip to content

Commit c304f16

Browse files
committed
fix: typecheck and tests
1 parent bd3a9d6 commit c304f16

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/types/api/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export interface QueryPlan {
190190

191191
// ==== Common types ====
192192

193-
export type CellValue = string | number | boolean | null | undefined;
193+
export type CellValue = string | number | null | undefined;
194194

195195
export type KeyValueRow<T = CellValue> = {
196196
[key: string]: T;

src/utils/__test__/getColumnWidth.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('getColumnWidth', () => {
2929

3030
it('calculates correct width for columns with header', () => {
3131
const result = getColumnWidth({data: [], name: 'test', header: 'a'});
32-
expect(result).toBe(HEADER_PADDING + SORT_ICON_PADDING + 'a'.length * PIXELS_PER_CHARACTER);
32+
expect(result).toBe(HEADER_PADDING + 'a'.length * PIXELS_PER_CHARACTER);
3333
});
3434

3535
it('returns MAX_COLUMN_WIDTH when calculated width exceeds it', () => {
@@ -58,13 +58,13 @@ describe('getColumnWidth', () => {
5858
it('handles null values in data correctly', () => {
5959
const data = [{test: 'a'}, {test: null}];
6060
const result = getColumnWidth({data, name: 'test'});
61-
expect(result).toBe(HEADER_PADDING + 'a'.length * PIXELS_PER_CHARACTER);
61+
expect(result).toBe(HEADER_PADDING + 'test'.length * PIXELS_PER_CHARACTER);
6262
});
6363

6464
it('handles undefined values in data correctly', () => {
6565
const data = [{test: 'a'}, {test: undefined}];
6666
const result = getColumnWidth({data, name: 'test'});
67-
expect(result).toBe(HEADER_PADDING + 'a'.length * PIXELS_PER_CHARACTER);
67+
expect(result).toBe(HEADER_PADDING + 'test'.length * PIXELS_PER_CHARACTER);
6868
});
6969

7070
it('handles empty string values in data correctly', () => {

0 commit comments

Comments
 (0)