|
1 | 1 | /** @fileoverview Tests for table formatting utilities. */ |
2 | 2 |
|
3 | | -import type { TableColumn } from '@socketsecurity/registry/tables' |
4 | | -import { formatSimpleTable, formatTable } from '@socketsecurity/registry/tables' |
5 | 3 | import { describe, expect, it } from 'vitest' |
6 | 4 | import colors from 'yoctocolors-cjs' |
7 | 5 |
|
| 6 | +import { formatSimpleTable, formatTable } from '@socketsecurity/registry/tables' |
| 7 | + |
| 8 | +import type { TableColumn } from '@socketsecurity/registry/tables' |
| 9 | + |
8 | 10 | describe('formatTable', () => { |
9 | 11 | it('should format empty data', () => { |
10 | 12 | const columns: TableColumn[] = [{ key: 'name', header: 'Name' }] |
@@ -92,7 +94,7 @@ describe('formatTable', () => { |
92 | 94 |
|
93 | 95 | // Should contain ANSI color codes |
94 | 96 |
|
95 | | - expect(result).toMatch(/\u001b\[/) |
| 97 | + expect(result).toContain('\u001b[') |
96 | 98 | }) |
97 | 99 |
|
98 | 100 | it('should handle missing values', () => { |
@@ -202,7 +204,7 @@ describe('formatSimpleTable', () => { |
202 | 204 |
|
203 | 205 | // Should contain ANSI color codes |
204 | 206 |
|
205 | | - expect(result).toMatch(/\u001b\[/) |
| 207 | + expect(result).toContain('\u001b[') |
206 | 208 | }) |
207 | 209 |
|
208 | 210 | it('should handle missing values in simple tables', () => { |
|
0 commit comments