From 90125566bbaed8b5c6e55ca8dbc432e3433fb73c Mon Sep 17 00:00:00 2001 From: Maximilien Mellen Date: Wed, 19 Feb 2020 21:36:18 +0100 Subject: Enable TS strict mode by default (#3899) Fixes #3324 Co-authored-by: Kitson Kelly --- std/encoding/csv_test.ts | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'std/encoding/csv_test.ts') diff --git a/std/encoding/csv_test.ts b/std/encoding/csv_test.ts index 74ba8face..efea353e1 100644 --- a/std/encoding/csv_test.ts +++ b/std/encoding/csv_test.ts @@ -476,26 +476,32 @@ for (const t of testCases) { if (t.Error) { let err; try { - actual = await readMatrix(new BufReader(new StringReader(t.Input)), { - comma: comma, - comment: comment, - trimLeadingSpace: trim, - fieldsPerRecord: fieldsPerRec, - lazyQuotes: lazyquote - }); + actual = await readMatrix( + new BufReader(new StringReader(t.Input ?? "")), + { + comma: comma, + comment: comment, + trimLeadingSpace: trim, + fieldsPerRecord: fieldsPerRec, + lazyQuotes: lazyquote + } + ); } catch (e) { err = e; } assert(err); assertEquals(err.message, t.Error); } else { - actual = await readMatrix(new BufReader(new StringReader(t.Input)), { - comma: comma, - comment: comment, - trimLeadingSpace: trim, - fieldsPerRecord: fieldsPerRec, - lazyQuotes: lazyquote - }); + actual = await readMatrix( + new BufReader(new StringReader(t.Input ?? "")), + { + comma: comma, + comment: comment, + trimLeadingSpace: trim, + fieldsPerRecord: fieldsPerRec, + lazyQuotes: lazyquote + } + ); const expected = t.Output; assertEquals(actual, expected); } -- cgit v1.2.3