Hours by client: add search and CSV filtering; add alerts cron (BRT 08:00 guard) + alerts panel filters; admin companies shows last alert; PDF Inter font from public/fonts; fix Select empty value; type cleanups; tests for CSV/TZ; remove Knowledge Base nav
This commit is contained in:
parent
2cf399dcb1
commit
08cc8037d5
151 changed files with 1404 additions and 214 deletions
18
tests/csv.test.ts
Normal file
18
tests/csv.test.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { describe, expect, it } from "vitest"
|
||||
import { csvEscape, rowsToCsv } from "@/lib/csv"
|
||||
|
||||
describe("csvEscape", () => {
|
||||
it("escapes quotes and commas", () => {
|
||||
expect(csvEscape('a,b')).toBe('"a,b"')
|
||||
expect(csvEscape('a"b')).toBe('"a""b"')
|
||||
expect(csvEscape('simple')).toBe('simple')
|
||||
})
|
||||
})
|
||||
|
||||
describe("rowsToCsv", () => {
|
||||
it("joins rows and columns with newline and commas", () => {
|
||||
const csv = rowsToCsv([["A", "B"], [1, 2]])
|
||||
expect(csv).toBe("A,B\n1,2\n")
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue