1
0
Fork 0

test: add bare-CR quoting case for CSV export

This commit is contained in:
Jonny 2026-07-13 17:11:44 +02:00
parent 45612501df
commit b1da32ae7a
1 changed files with 15 additions and 0 deletions

View File

@ -50,4 +50,19 @@ describe("schichtenZuCsv", () => {
expect(csv).toContain(`'=HYPERLINK`); expect(csv).toContain(`'=HYPERLINK`);
expect(csv).not.toMatch(/;=HYPERLINK/); expect(csv).not.toMatch(/;=HYPERLINK/);
}); });
it("quotet ein Feld mit eingebettetem Carriage Return", () => {
const csv = schichtenZuCsv([
{
fahrerName: "Anna\rFahrer",
datum: "2026-07-13",
kommtUm: "2026-07-13T06:00:00.000Z",
gehtUm: null,
bruttoMinuten: 0,
pauseMinuten: 0,
nettoMinuten: 0,
},
]);
expect(csv).toContain('"Anna\rFahrer"');
});
}); });