From da06f9d30808cfb4fa0b80abf8ea3b359616d811 Mon Sep 17 00:00:00 2001 From: chika3742 Date: Sat, 9 Sep 2023 16:42:26 +0900 Subject: [PATCH] test(dsv): update test for processRow types --- packages/dsv/test/types.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/dsv/test/types.ts b/packages/dsv/test/types.ts index f48fb7319..a632ed3ca 100644 --- a/packages/dsv/test/types.ts +++ b/packages/dsv/test/types.ts @@ -2,6 +2,8 @@ import type { RollupOptions } from 'rollup'; import dsv from '..'; +const parse = (value: string) => (isNaN(+value) ? value : +value); + const config: RollupOptions = { input: 'main.js', output: { @@ -13,7 +15,12 @@ const config: RollupOptions = { include: 'node_modules/**', exclude: ['node_modules/foo/**', 'node_modules/bar/**'], processRow(row) { - return row; + return Object.entries(row).map(([key, value]) => [key, parse(value)]); + } + }), + dsv({ + processRow() { + // void } }) ]