Skip to content

Commit 63a5892

Browse files
author
juliehubs
authored
Bug Fix/Clean Up: update income descriptions and update jest snapshots (#65)
* Adding required to income and updating snapshots * updating version * rerunning package lock
1 parent 3441b0f commit 63a5892

File tree

5 files changed

+81
-74
lines changed

5 files changed

+81
-74
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@withabound/node-sdk",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "The Abound Node library provides convenient access to the Abound API from applications written in server-side JavaScript.",
55
"author": "Abound <[email protected]>",
66
"license": "MIT",

src/resources/Incomes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { AboundUserScopedResource } from "./base/AboundUserScopedResource";
66
export interface IncomeRequest {
77
amount: number; // float
88
date: string; // YYYY-MM-DD
9+
description: string;
910

1011
incomeType?: IncomeType;
11-
description?: string;
1212
category?: string;
1313
foreignId?: string;
1414
// The specific document code used when filling out this income.

tests/resources/Incomes.spec.ts

Lines changed: 71 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ describe("Abound Incomes", () => {
2929
await abound.incomes.create(TEST_USER_ID, [
3030
{
3131
incomeType: IncomeType.TEN99,
32+
description: "Client Invoice",
3233
date: "2021-08-01",
3334
amount: 410.11,
3435
},
@@ -113,30 +114,30 @@ describe("Abound Incomes", () => {
113114
);
114115

115116
expect(incomes.data).toMatchInlineSnapshot(`
116-
Array [
117-
Object {
118-
"amount": 222.34,
119-
"category": "Design Services",
120-
"date": "2020-01-14",
121-
"description": "Client Invoice",
122-
"foreignId": "your_foreign_id",
123-
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
124-
"incomeType": "1099",
125-
"notes": Object {},
126-
},
127-
Object {
128-
"amount": 333.34,
129-
"category": "Design Services",
130-
"date": "2020-01-14",
131-
"description": "Client Invoice",
132-
"documentType": "ssa1099",
133-
"foreignId": "your_foreign_id",
134-
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
135-
"incomeType": "1099",
136-
"notes": Object {},
137-
},
138-
]
139-
`);
117+
Array [
118+
Object {
119+
"amount": 222.34,
120+
"category": "Design Services",
121+
"date": "2020-01-14",
122+
"description": "description",
123+
"foreignId": "your_foreign_id",
124+
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
125+
"incomeType": "1099",
126+
"notes": Object {},
127+
},
128+
Object {
129+
"amount": 333.34,
130+
"category": "Design Services",
131+
"date": "2020-01-14",
132+
"description": "another one",
133+
"documentType": "ssa1099",
134+
"foreignId": "your_foreign_id",
135+
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
136+
"incomeType": "1099",
137+
"notes": Object {},
138+
},
139+
]
140+
`);
140141
});
141142

142143
it("returns a promise that resolves to the user's incomes with filters applied when provided", async () => {
@@ -148,30 +149,30 @@ describe("Abound Incomes", () => {
148149
);
149150

150151
expect(incomes.data).toMatchInlineSnapshot(`
151-
Array [
152-
Object {
153-
"amount": 222.34,
154-
"category": "Design Services",
155-
"date": "2020-01-14",
156-
"description": "Client Invoice",
157-
"foreignId": "your_foreign_id",
158-
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
159-
"incomeType": "1099",
160-
"notes": Object {},
161-
},
162-
Object {
163-
"amount": 333.34,
164-
"category": "Design Services",
165-
"date": "2020-01-14",
166-
"description": "Client Invoice",
167-
"documentType": "ssa1099",
168-
"foreignId": "your_foreign_id",
169-
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
170-
"incomeType": "1099",
171-
"notes": Object {},
172-
},
173-
]
174-
`);
152+
Array [
153+
Object {
154+
"amount": 222.34,
155+
"category": "Design Services",
156+
"date": "2020-01-14",
157+
"description": "description",
158+
"foreignId": "your_foreign_id",
159+
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
160+
"incomeType": "1099",
161+
"notes": Object {},
162+
},
163+
Object {
164+
"amount": 333.34,
165+
"category": "Design Services",
166+
"date": "2020-01-14",
167+
"description": "another one",
168+
"documentType": "ssa1099",
169+
"foreignId": "your_foreign_id",
170+
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
171+
"incomeType": "1099",
172+
"notes": Object {},
173+
},
174+
]
175+
`);
175176
});
176177
});
177178

@@ -183,17 +184,17 @@ describe("Abound Incomes", () => {
183184
);
184185

185186
expect(income.data).toMatchInlineSnapshot(`
186-
Object {
187-
"amount": 222.34,
188-
"category": "Design Services",
189-
"date": "2020-01-14",
190-
"description": "Client Invoice",
191-
"foreignId": "your_foreign_id",
192-
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
193-
"incomeType": "1099",
194-
"notes": Object {},
195-
}
196-
`);
187+
Object {
188+
"amount": 222.34,
189+
"category": "Design Services",
190+
"date": "2020-01-14",
191+
"description": "blah",
192+
"foreignId": "your_foreign_id",
193+
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
194+
"incomeType": "1099",
195+
"notes": Object {},
196+
}
197+
`);
197198
});
198199
});
199200

@@ -208,17 +209,17 @@ describe("Abound Incomes", () => {
208209
);
209210

210211
expect(updatedIncome.data).toMatchInlineSnapshot(`
211-
Object {
212-
"amount": 120.88,
213-
"category": "Design Services",
214-
"date": "2020-01-14",
215-
"description": "Client Invoice",
216-
"foreignId": "your_foreign_id",
217-
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
218-
"incomeType": "1099",
219-
"notes": Object {},
220-
}
221-
`);
212+
Object {
213+
"amount": 120.88,
214+
"category": "Design Services",
215+
"date": "2020-01-14",
216+
"description": "aaay lmao",
217+
"foreignId": "your_foreign_id",
218+
"incomeId": "incomeId_test8cb0d56b942722b6d719fa5aa9c5a8dbaa0f",
219+
"incomeType": "1099",
220+
"notes": Object {},
221+
}
222+
`);
222223
});
223224
});
224225

tests/resources/users.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ describe("Abound Users", () => {
6868
"firstName": "Ada",
6969
"ipAddress": null,
7070
"lastName": "Lovelace",
71+
"notes": null,
7172
"phoneNumber": "6505551010",
73+
"sourceIp": null,
7274
"state": "CA",
7375
"zipcode": "94306",
7476
},
@@ -96,7 +98,9 @@ describe("Abound Users", () => {
9698
"firstName": "Ada",
9799
"ipAddress": null,
98100
"lastName": "Lovelace",
101+
"notes": null,
99102
"phoneNumber": "6505551010",
103+
"sourceIp": null,
100104
"state": "CA",
101105
"zipcode": "94306",
102106
},
@@ -129,7 +133,9 @@ describe("Abound Users", () => {
129133
"firstName": "Ada",
130134
"ipAddress": null,
131135
"lastName": "Lovelace",
136+
"notes": null,
132137
"phoneNumber": "6505551010",
138+
"sourceIp": null,
133139
"state": "CA",
134140
"zipcode": "94306",
135141
},

0 commit comments

Comments
 (0)