Commit df1afec
23 Donation e2e integration and controller unit testing (#28)
* E2E test stubs
* feat: donations controller impl
* Some failure tests, adding supertest and expanding jest.config.ts to recognize tests in /test folder
* SqLite setup and longer setup timeout
* Using enums, testing for umbrella db throws error, GET cases if db is empty
* Passing success tests
* Test cases for missing responses and expanded DTO validation
* reformatting
* Fixed DTO field test
* Removing unnecessary cases
* Changed wording to be clearer
* validation to match real service behavior
* Rename donations.e2e-spec.ts to donations.controller.spec.ts
* Tests pass e2e without db state check or cleanup yet
* Tests don't actually pass e2e, no db state check or cleanup yet
* Temporary logging, using actual db
* Database entry validation, uses donation transactions
* Removing console.logs and moving most of the donation with mock tests into donation.spec.ts
* Fix for created at, may reduce performance(?)
* Fix for returning non-anonymous donations
* New migration created for int amount
* Defaulting createdAt and updatedAt , tests pass
* change test DB creds and add environment variables
---------
Co-authored-by: Ben Petrillo <benpetrillo.bp@gmail.com>
Co-authored-by: thaninbew <kongkiatsophon.t@northeastern.edu>1 parent 28e9c06 commit df1afec
File tree
10 files changed
+2100
-77
lines changed- apps/backend
- src
- donations
- migrations
- test
10 files changed
+2100
-77
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
2 | 8 | | |
3 | 9 | | |
4 | 10 | | |
| |||
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | | - | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| |||
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
63 | | - | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | | - | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
0 commit comments