test: comprehensive test suites and quality gates pass across backend, storefront and admin
- Backend (NestJS): 82 suites, 641 tests passing; 0 ESLint errors; 0 tsc errors. Hardened SSL cert/key matching, SSRF IP pinning, and eBank validation. - Admin Panel (Vite/React): 48 suites, 300 tests passing; 0 ESLint errors; 0 tsc errors. Full coverage across all pages and settings. - Storefront (Next.js): 62 suites, 368 tests passing; 0 ESLint errors; 0 tsc errors. - Fixed unmount lifecycle guards, promise error handling, and component edge cases.
This commit is contained in:
1 parent
1e73715169
commit
ddbf1ca026
439 files changed
+32911
-6107
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { Injectable, NotFoundException } from '@nestjs/common';
|
||||
import { Prisma } from '@prisma/client';
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
import { Injectable, NotFoundException } from "@nestjs/common";
|
||||
import { Prisma } from "@prisma/client";
|
||||
import { PrismaService } from "../prisma/prisma.service";
|
||||
|
||||
export class PetQuery {
|
||||
page?: number | string;
|
||||
@@ -18,7 +18,7 @@ export class PetsService {
|
||||
const skip = (page - 1) * limit;
|
||||
|
||||
const where: Prisma.PetWhereInput = query.search
|
||||
? { name: { contains: query.search, mode: 'insensitive' } }
|
||||
? { name: { contains: query.search, mode: "insensitive" } }
|
||||
: {};
|
||||
|
||||
const [data, total] = await Promise.all([
|
||||
@@ -26,7 +26,7 @@ export class PetsService {
|
||||
where,
|
||||
skip,
|
||||
take: limit,
|
||||
orderBy: { createdAt: 'desc' },
|
||||
orderBy: { createdAt: "desc" },
|
||||
include: {
|
||||
user: {
|
||||
select: {
|
||||
@@ -39,11 +39,11 @@ export class PetsService {
|
||||
medicalConditions: true,
|
||||
reminders: true,
|
||||
healthLogs: {
|
||||
orderBy: { createdAt: 'desc' },
|
||||
orderBy: { createdAt: "desc" },
|
||||
take: 10,
|
||||
},
|
||||
prescriptions: {
|
||||
orderBy: { createdAt: 'desc' },
|
||||
orderBy: { createdAt: "desc" },
|
||||
take: 5,
|
||||
},
|
||||
},
|
||||
@@ -64,7 +64,7 @@ export class PetsService {
|
||||
|
||||
async deletePet(id: string) {
|
||||
const pet = await this.prisma.pet.findUnique({ where: { id } });
|
||||
if (!pet) throw new NotFoundException('Pet not found');
|
||||
if (!pet) throw new NotFoundException("Pet not found");
|
||||
return this.prisma.pet.delete({ where: { id } });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user