diff --git a/.prettierignore b/.prettierignore index 9b1c8b133..1188a3b2b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,2 @@ /dist +/test/import diff --git a/test/import/invalid-date.json b/test/import/invalid-date.json new file mode 100644 index 000000000..2ddaf372e --- /dev/null +++ b/test/import/invalid-date.json @@ -0,0 +1,18 @@ +{ + "meta": { + "date": "2021-01-01T00:00:00.000Z", + "version": "dev" + }, + "orders": [ + { + "currency": "USD", + "dataSource": "YAHOO", + "date": "", + "fee": 0, + "quantity": 20, + "symbol": "AAPL", + "type": "BUY", + "unitPrice": 100.0 + } + ] +} diff --git a/test/import/invalid-fee.csv b/test/import/invalid-fee.csv new file mode 100644 index 000000000..f0df9d581 --- /dev/null +++ b/test/import/invalid-fee.csv @@ -0,0 +1,2 @@ +Date,Code,CCY,Price,Qty,Action,Amount,Fee +16/09/2021,MSFT,USD,298.580,5,buy,1496.09, diff --git a/test/import/invalid-symbol.json b/test/import/invalid-symbol.json new file mode 100644 index 000000000..c03f86e5d --- /dev/null +++ b/test/import/invalid-symbol.json @@ -0,0 +1,18 @@ +{ + "meta": { + "date": "2021-01-01T00:00:00.000Z", + "version": "dev" + }, + "orders": [ + { + "currency": "USD", + "dataSource": "YAHOO", + "date": "2021-01-01T00:00:00.000Z", + "fee": 0, + "quantity": 20, + "symbol": "", + "type": "BUY", + "unitPrice": 100.0 + } + ] +} diff --git a/test/import/unexpected-format.json b/test/import/unexpected-format.json new file mode 100644 index 000000000..5468597e2 --- /dev/null +++ b/test/import/unexpected-format.json @@ -0,0 +1 @@ +