Compare commits

..

2 Commits

Author SHA1 Message Date
Gitea Actions
9ffcc9d65d ci: Bump version to 0.9.75 [skip ci] 2026-01-10 03:25:25 +05:00
1285702210 adr-028 fixes for tests
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 15m38s
2026-01-09 14:24:20 -08:00
3 changed files with 16 additions and 10 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "flyer-crawler",
"version": "0.9.74",
"version": "0.9.75",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "flyer-crawler",
"version": "0.9.74",
"version": "0.9.75",
"dependencies": {
"@bull-board/api": "^6.14.2",
"@bull-board/express": "^6.14.2",

View File

@@ -1,7 +1,7 @@
{
"name": "flyer-crawler",
"private": true,
"version": "0.9.74",
"version": "0.9.75",
"type": "module",
"scripts": {
"dev": "concurrently \"npm:start:dev\" \"vite\"",

View File

@@ -52,9 +52,9 @@ describe('Reaction Routes (/api/reactions)', () => {
it('should return a list of reactions', async () => {
const mockReactions = [
{ id: 1, reaction_type: 'like', entity_id: '123' },
] as Partial<UserReaction>[];
vi.mocked(reactionRepo.getReactions).mockResolvedValue(mockReactions as UserReaction[]);
{ reaction_id: 1, reaction_type: 'like', entity_id: '123' },
] as unknown as UserReaction[];
vi.mocked(reactionRepo.getReactions).mockResolvedValue(mockReactions);
const response = await supertest(app).get('/api/reactions');
@@ -64,8 +64,10 @@ describe('Reaction Routes (/api/reactions)', () => {
});
it('should filter by query parameters', async () => {
const mockReactions = [{ id: 1, reaction_type: 'like' }] as Partial<UserReaction>[];
vi.mocked(reactionRepo.getReactions).mockResolvedValue(mockReactions as UserReaction[]);
const mockReactions = [
{ reaction_id: 1, reaction_type: 'like' },
] as unknown as UserReaction[];
vi.mocked(reactionRepo.getReactions).mockResolvedValue(mockReactions);
const validUuid = '123e4567-e89b-12d3-a456-426614174000';
const query = { userId: validUuid, entityType: 'recipe', entityId: '1' };
@@ -143,8 +145,12 @@ describe('Reaction Routes (/api/reactions)', () => {
};
it('should return 201 when a reaction is added', async () => {
const mockResult = { ...validBody, id: 1, user_id: 'user-123' } as Partial<UserReaction>;
vi.mocked(reactionRepo.toggleReaction).mockResolvedValue(mockResult as UserReaction);
const mockResult = {
...validBody,
reaction_id: 1,
user_id: 'user-123',
} as unknown as UserReaction;
vi.mocked(reactionRepo.toggleReaction).mockResolvedValue(mockResult);
const response = await supertest(app).post('/api/reactions/toggle').send(validBody);