Skip to content

Commit

Permalink
fix(backend): fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pYassine committed Oct 15, 2024
1 parent 2de084a commit 60c4cdf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
9 changes: 4 additions & 5 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"@sentry/opentelemetry-node": "^7.117.0",
"@sentry/profiling-node": "^8.22.0",
"@socialgouv/streaming-file-encryption": "^1.1.0",
"@types/source-map-support": "^0.5.10",
"aws-sdk": "^2.1691.0",
"axios": "^1.7.7",
"bcryptjs": "^2.4.3",
Expand Down Expand Up @@ -126,8 +125,8 @@
"@types/lodash.isequal": "^4.5.8",
"@types/lodash.set": "^4.3.9",
"@types/multer": "^1.4.6",
"@types/node": "^20.11.19",
"@types/node-pdftk": "^2.1.9",
"@types/node": "^20.11.19",
"@types/nodemailer": "^6.4.2",
"@types/nunjucks": "^3.2.1",
"@types/passport-jwt": "^3.0.5",
Expand All @@ -137,27 +136,27 @@
"@types/rimraf": "^4.0.5",
"@types/sanitize-html": "^2.11.0",
"@types/slug": "^5.0.9",
"@types/source-map-support": "^0.5.10",
"@types/striptags": "^3.1.1",
"@types/supertest": "^6.0.2",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"aws-sdk-client-mock": "^4.0.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^7.0.0",
"eslint": "^8.57.0",
"jest": "^29.7.0",
"lint-staged": "^15.2.10",
"nodemon": "^3.1.7",
"prettier": "^2.8.8",
"supertest": "^7.0.0",
"swagger-ui-express": "^5.0.0",
"timezone-mock": "^1.3.6",
"ts-jest": "^29.1.1",
"ts-node": "10.9.2",
"ts-node-dev": "^2.0.0",
"ts-node": "10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "4.9.5"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import { UsersModule } from "../users/users.module";
import { ExpressResponse } from "../util/express";
import { AppTestContext, AppTestHelper } from "../util/test";

import { AdminStructuresModule } from "../modules/portail-admin/controllers/admin-structures";
import { AdminStructuresDeleteModule } from "../modules/portail-admin/controllers/admin-structures-delete";
import { AdminStructuresDeleteController } from "../modules/portail-admin/controllers/admin-structures-delete/admin-structures-delete.controller";
import { AdminStructuresController } from "../modules/portail-admin/controllers/admin-structures/admin-structures.controller";
import { StructuresController } from "./controllers/structures.controller";
Expand All @@ -20,6 +18,7 @@ import { StructureWithUserDto } from "./dto/structure-with-user.dto";
import { StructureDto } from "./dto/structure.dto";
import { structureDeletorService } from "./services/structure-deletor.service";
import { StructuresModule } from "./structure.module";
import { PortailAdminModule } from "../modules/portail-admin";

const structureDto: StructureDto = {
adresse: "1 rue de Pessac",
Expand Down Expand Up @@ -79,8 +78,7 @@ describe("Stuctures creation full", () => {
InteractionsModule,
StatsModule,
StructuresModule,
AdminStructuresModule,
AdminStructuresDeleteModule,
PortailAdminModule,
],
providers: [],
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { HttpClientTestingModule } from "@angular/common/http/testing";
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { RouterTestingModule } from "@angular/router/testing";
import { AdminStructuresModule } from "../../../admin-structures.module";
import { AdminStructuresTableComponent } from "./admin-structures-table.component";
import { AdminStructuresModule } from "../../admin-structures.module";
import { RouterModule } from "@angular/router";

describe("AdminStructuresTableComponent", () => {
let component: AdminStructuresTableComponent;
Expand All @@ -13,8 +13,7 @@ describe("AdminStructuresTableComponent", () => {
declarations: [AdminStructuresTableComponent],
imports: [
AdminStructuresModule,
RouterTestingModule,

RouterModule.forRoot([]),
HttpClientTestingModule,
],
}).compileComponents();
Expand Down

0 comments on commit 60c4cdf

Please sign in to comment.