Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
node_modules
db.env
db_test.env
.env
*.env
.qodo
.vscode
frontend
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile.prod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ FROM node:lts-alpine
WORKDIR /app

COPY package.json .
COPY tsconfig.json .
RUN npm install --only=production

RUN apk --update --no-cache add curl

COPY dist/ ./dist

CMD npm run start:prod
COPY scripts/wait-for-healthcheck.sh /usr/local/bin/wait-for-healthcheck.sh
RUN chmod +x /usr/local/bin/wait-for-healthcheck.sh
5 changes: 4 additions & 1 deletion __tests__/company/company-db.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ beforeAll(async () => {
try {
if (!testDataSource.isInitialized) {
await testDataSource.initialize();
await testDataSource.query("TRUNCATE TABLE company CASCADE");
}
} catch (error) {
console.error("Error initializing test database:", error);
Expand All @@ -68,11 +69,13 @@ beforeAll(async () => {
afterAll(async () => {
//ON VIDE LA DB DE TEST
if (testDataSource.isInitialized) {
await testDataSource.dropDatabase();

await testDataSource.destroy();
}
jest.clearAllMocks();
});


type TResponse = {
company: Company;
};
Expand Down
Loading