]> git.ardis.lu - csvio/commitdiff
Clean up unused variables
authorArdis Lu <ardisglu@gmail.com>
Sat, 13 Sep 2025 05:15:07 +0000 (22:15 -0700)
committerArdis Lu <ardisglu@gmail.com>
Sat, 13 Sep 2025 05:15:07 +0000 (22:15 -0700)
test/core.test.js
test/errorStrategies.test.js

index db893e78da14b6f614b8b8c7ce2814a5cd4f46f8..f2efd9558d8a75d739f5731ba819bd13ed0d0f37 100644 (file)
@@ -720,7 +720,7 @@ suite('CSVWriter', { concurrency: true }, () => {
     deepStrictEqual(s instanceof CSVWriter, true);
     await s.abort();
   });
-  test('can create TransformStream (raw strings)', { concurrency: true }, async (t) => {
+  test('can create TransformStream (raw strings)', { concurrency: true }, async () => {
     const input = new URL('./data/simple.csv', import.meta.url);
     const stream = new CSVReader(input).pipeThrough(new CSVWriter());
     const expected = [
@@ -757,7 +757,7 @@ suite('CSVWriter status', { concurrency: true }, () => {
     await createCSVMockStream([['']]).pipeTo(writer);
     deepStrictEqual(writer.status.name, basename(temp));
   });
-  test('records file name of "null" if CSVWriter is a TransformStream', { concurrency: true }, async (t) => {
+  test('records file name of "null" if CSVWriter is a TransformStream', { concurrency: true }, async () => {
     const writer = new CSVWriter();
     const stream = createCSVMockStream([['']]).pipeThrough(writer);
     deepStrictEqual(writer.status.name, null);
@@ -828,7 +828,7 @@ suite('CSVWriter status', { concurrency: true }, () => {
         ['row 3', 'c']
       ]));
   });
-  test('counts raw CSV string as one row when TransformStream', { concurrency: true }, async (t) => {
+  test('counts raw CSV string as one row when TransformStream', { concurrency: true }, async () => {
     const writer = new CSVWriter();
     const stream = createCSVMockStream([['']])
       .pipeThrough(new CSVTransformer(() => 'row 1,a\r\nrow 2,b\r\nrow 3,c', { handleHeaders: true }))
index 177c46b216b83c3ed16975c2c0e9b979019186da..124446e12209dbae9a2cc272f0772c849db631eb 100644 (file)
@@ -46,7 +46,7 @@ suite('ErrorStrategies.skip', { concurrency: true }, () => {
       ['2', '2', '2'],
       ['3', '3', '3']
     ])
-      .pipeThrough(new CSVTransformer(r => { throw new Error(); }, { onError: skip() }))
+      .pipeThrough(new CSVTransformer(() => { throw new Error(); }, { onError: skip() }))
       .pipeTo(csvStreamEqualWritable([
         ['header', 'header', 'header']
       ]));
@@ -59,7 +59,7 @@ suite('ErrorStrategies.placeholder', { concurrency: true }, () => {
       ['header', 'header', 'header'],
       ['1', '1', '1']
     ])
-      .pipeThrough(new CSVTransformer(r => { throw new Error(); }, { onError: placeholder('n/a') }))
+      .pipeThrough(new CSVTransformer(() => { throw new Error(); }, { onError: placeholder('n/a') }))
       .pipeTo(csvStreamEqualWritable([
         ['header', 'header', 'header'],
         ['n/a', 'n/a', 'n/a']
@@ -71,7 +71,7 @@ suite('ErrorStrategies.placeholder', { concurrency: true }, () => {
       ['1', '1', '1'],
       ['1', '1', '1']
     ])
-      .pipeThrough(new CSVTransformer(r => { throw new Error(); }, { onError: placeholder('n/a') }))
+      .pipeThrough(new CSVTransformer(() => { throw new Error(); }, { onError: placeholder('n/a') }))
       .pipeTo(csvStreamEqualWritable([
         ['header', 'header', 'header'],
         ['n/a', 'n/a', 'n/a'],
@@ -83,7 +83,7 @@ suite('ErrorStrategies.placeholder', { concurrency: true }, () => {
       ['header', 'header', 'header'],
       ['1']
     ])
-      .pipeThrough(new CSVTransformer(r => { throw new Error(); }, { onError: placeholder('n/a') }))
+      .pipeThrough(new CSVTransformer(() => { throw new Error(); }, { onError: placeholder('n/a') }))
       .pipeTo(csvStreamEqualWritable([
         ['header', 'header', 'header'],
         ['n/a']
@@ -94,7 +94,7 @@ suite('ErrorStrategies.placeholder', { concurrency: true }, () => {
       ['header', 'header', 'header'],
       []
     ])
-      .pipeThrough(new CSVTransformer(r => { throw new Error(); }, { onError: placeholder('n/a') }))
+      .pipeThrough(new CSVTransformer(() => { throw new Error(); }, { onError: placeholder('n/a') }))
       .pipeTo(csvStreamEqualWritable([
         ['header', 'header', 'header'],
         ['n/a']
This page took 0.045325 seconds and 4 git commands to generate.