From 74059cdda36a7744f22e3698688ce33b178dccb0 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sun, 19 Oct 2025 22:42:50 -0700 Subject: [PATCH] Add test case for shorthand with literal names --- test/normalization.test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/normalization.test.js b/test/normalization.test.js index 97bbc0f..e6a92f4 100644 --- a/test/normalization.test.js +++ b/test/normalization.test.js @@ -282,6 +282,18 @@ suite('CSVNormalizer', { concurrency: true }, () => { ['a', 'b'] ])); }); + test('accepts string shorthand with literal names', { concurrency: true }, async () => { + await createCSVMockStream([ + ['columnA', 'column_A', 'column A'], + ['1', '2', '3'] + ]) + .pipeThrough(new CSVNormalizer(['columnA', 'column_A', 'column A'], { useLiteralNames: true })) + .pipeThrough(new CSVDenormalizer()) + .pipeTo(csvStreamEqualWritable([ + ['columnA', 'column_A', 'column A'], + ['1', '2', '3'] + ])); + }); test('accepts mixed string and CSVNormalizerHeader to set headers', { concurrency: true }, async () => { await createCSVMockStream([ ['columnA', 'columnB'], -- 2.47.3