Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
58badf6
E2E test stubs
SamNie2027 Oct 24, 2025
2d3469f
feat: donations controller impl
benjaspet Oct 27, 2025
fdc5e30
Some failure tests, adding supertest and expanding jest.config.ts to …
SamNie2027 Oct 30, 2025
de85e25
SqLite setup and longer setup timeout
SamNie2027 Oct 30, 2025
d0f5d02
Using enums, testing for umbrella db throws error, GET cases if db is…
SamNie2027 Oct 30, 2025
5142ef6
Merge branch 'main' into 23-Donation-E2E-integration-testing
SamNie2027 Oct 30, 2025
650a830
Merge remote-tracking branch 'origin/feat-11-donations-controller-and…
SamNie2027 Oct 30, 2025
68724c6
Passing success tests
SamNie2027 Oct 31, 2025
05ba452
Test cases for missing responses and expanded DTO validation
SamNie2027 Oct 31, 2025
7d4373c
reformatting
SamNie2027 Oct 31, 2025
07c69df
Fixed DTO field test
SamNie2027 Oct 31, 2025
43c7236
Removing unnecessary cases
SamNie2027 Oct 31, 2025
0e11e98
Merge branch 'main' into 23-Donation-E2E-integration-testing
SamNie2027 Nov 7, 2025
0397faf
Changed wording to be clearer
SamNie2027 Nov 7, 2025
0c76af0
validation to match real service behavior
thaninbew Nov 10, 2025
8d8203d
Rename donations.e2e-spec.ts to donations.controller.spec.ts
SamNie2027 Nov 10, 2025
4eeecad
Tests pass e2e without db state check or cleanup yet
SamNie2027 Nov 10, 2025
fa38a80
Tests don't actually pass e2e, no db state check or cleanup yet
SamNie2027 Nov 10, 2025
58e1983
Temporary logging, using actual db
SamNie2027 Nov 14, 2025
275aa4b
Database entry validation, uses donation transactions
SamNie2027 Nov 17, 2025
1d9f8b3
Removing console.logs and moving most of the donation with mock tests…
SamNie2027 Nov 17, 2025
42a367f
Fix for created at, may reduce performance(?)
SamNie2027 Nov 18, 2025
a68e400
Fix for returning non-anonymous donations
SamNie2027 Nov 21, 2025
5959090
New migration created for int amount
SamNie2027 Nov 22, 2025
8f12545
Defaulting createdAt and updatedAt , tests pass
SamNie2027 Nov 22, 2025
b4cc840
change test DB creds and add environment variables
thaninbew Nov 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/backend/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export default {
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/apps/backend',
testMatch: ['<rootDir>/src/**/*.spec.ts', '<rootDir>/test/**/*.spec.ts', '<rootDir>/test/**/*.e2e-spec.ts'],
};
14 changes: 10 additions & 4 deletions apps/backend/src/donations/donation.entity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
} from 'typeorm';

export enum DonationType {
ONE_TIME = 'one_time',
Expand Down Expand Up @@ -36,7 +42,7 @@ export class Donation {
@Column()
email: string;

@Column({ type: 'numeric', precision: 10, scale: 2 })
@Column({ type: 'int' })
amount: number;

@Column({ default: false })
Expand All @@ -60,9 +66,9 @@ export class Donation {
@Column({ nullable: true })
transactionId: string | null;

@Column()
@CreateDateColumn({ type: 'timestamp', default: () => 'now()' })
createdAt: Date;

@Column()
@UpdateDateColumn({ type: 'timestamp', default: () => 'now()' })
updatedAt: Date;
}
Loading