mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-02 17:26:24 +00:00
test(costs): escape the BOM in the CSV export assertion
A literal U+FEFF inside a regex trips no-irregular-whitespace, which is an error rather than a warning, so the client lint job failed. The escape is equivalent.
This commit is contained in:
@@ -1274,7 +1274,7 @@ describe('CostsPanel — remaining paths', () => {
|
||||
await screen.findByText('Tip')
|
||||
fireEvent.click(screen.getByTitle('Export CSV'))
|
||||
|
||||
const lines = (await exported!.text()).replace(/^/, '').split('\r\n')
|
||||
const lines = (await exported!.text()).replace(/^\uFEFF/, '').split('\r\n')
|
||||
expect(lines[0]).toBe('Date;Name;Category;Amount;Currency;Amount (EUR);Note')
|
||||
// Oldest first, dateless rows leading.
|
||||
expect(lines[1]).toBe(';Tip;Tips;5.00;EUR;5.00;')
|
||||
|
||||
Reference in New Issue
Block a user