From e3654e8ae27cda343744ed8b703cf53addc44fc8 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Mon, 14 Aug 2023 16:38:24 +0800 Subject: [PATCH] fix test --- packages/import-handler/test/csv/csv.test.ts | 2 +- packages/import-handler/test/csv/data/complex.csv | 7 ++++--- packages/import-handler/test/csv/data/labels.csv | 7 ++++--- packages/import-handler/test/csv/data/simple.csv | 5 +++-- packages/import-handler/test/csv/data/unset-status.csv | 5 +++-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/import-handler/test/csv/csv.test.ts b/packages/import-handler/test/csv/csv.test.ts index 82798fa89..4de6cb433 100644 --- a/packages/import-handler/test/csv/csv.test.ts +++ b/packages/import-handler/test/csv/csv.test.ts @@ -135,7 +135,7 @@ describe('Test csv importer', () => { expect(importedLabels).to.eql([ ['Label1', 'Label2', 'Label 3', 'Label 4'], [], - [], + undefined, ]) }) }) diff --git a/packages/import-handler/test/csv/data/complex.csv b/packages/import-handler/test/csv/data/complex.csv index 6b8968660..651b6b0f2 100644 --- a/packages/import-handler/test/csv/data/complex.csv +++ b/packages/import-handler/test/csv/data/complex.csv @@ -1,3 +1,4 @@ -"https://omnivore.app",ARCHIVED,"[""test""]" -"https://google.com",SUCCEEDED,"[""test"",""development""]" -https://test.com,SUCCEEDED,"[test, development]" +url,state,labels,saved_at,published_at +"https://omnivore.app",ARCHIVED,"[""test""]",, +"https://google.com",SUCCEEDED,"[""test"",""development""]",, +https://test.com,SUCCEEDED,"[test, development]",, diff --git a/packages/import-handler/test/csv/data/labels.csv b/packages/import-handler/test/csv/data/labels.csv index 5c093b369..2b1f59eba 100644 --- a/packages/import-handler/test/csv/data/labels.csv +++ b/packages/import-handler/test/csv/data/labels.csv @@ -1,3 +1,4 @@ -"https://test.url/path01",,"[Label1,Label2, Label 3, Label 4 ]" -"https://test.url/path02",,"[]" -"https://test.url/path03",, \ No newline at end of file +url,state,labels,saved_at,published_at +"https://test.url/path01",,"[Label1,Label2, Label 3, Label 4 ]",, +"https://test.url/path02",,"[]",, +"https://test.url/path03",,,, diff --git a/packages/import-handler/test/csv/data/simple.csv b/packages/import-handler/test/csv/data/simple.csv index 8202bc11b..f2c08f3a4 100644 --- a/packages/import-handler/test/csv/data/simple.csv +++ b/packages/import-handler/test/csv/data/simple.csv @@ -1,2 +1,3 @@ -"https://omnivore.app" -"https://google.com" +url,state,labels,saved_at,published_at +"https://omnivore.app",,,, +"https://google.com",,,, diff --git a/packages/import-handler/test/csv/data/unset-status.csv b/packages/import-handler/test/csv/data/unset-status.csv index ecc325416..f672cd2f3 100644 --- a/packages/import-handler/test/csv/data/unset-status.csv +++ b/packages/import-handler/test/csv/data/unset-status.csv @@ -1,2 +1,3 @@ -"https://test.url/path01",,"[Random]" -"https://test.url/path02",ARCHIVED,"[Random]" \ No newline at end of file +url,state,labels,saved_at,published_at +"https://test.url/path01",,"[Random]",, +"https://test.url/path02",ARCHIVED,"[Random]",,