Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Add test data (#424)

Thomas Kaul43104f81d035
diff --git a/.prettierignore b/.prettierignore
index 9b1c8b133c..1188a3b2b0 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 0000000000..2ddaf372ef
--- /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": "<invalid>",
+ "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 0000000000..f0df9d581b
--- /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,<invalid>
diff --git a/test/import/invalid-symbol.json b/test/import/invalid-symbol.json
new file mode 100644
index 0000000000..c03f86e5da
--- /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": "<invalid>",
+ "type": "BUY",
+ "unitPrice": 100.0
+ }
+ ]
+}
diff --git a/test/import/unexpected-format.json b/test/import/unexpected-format.json
new file mode 100644
index 0000000000..5468597e2b
--- /dev/null
+++ b/test/import/unexpected-format.json
@@ -0,0 +1 @@
+<invalid>