This commit is contained in:
@@ -21,6 +21,8 @@ export class TaskRepository extends Repository<TMTask> {
|
|||||||
.leftJoinAndSelect("task.times", "time")
|
.leftJoinAndSelect("task.times", "time")
|
||||||
.leftJoinAndSelect("task.ticket", "ticket")
|
.leftJoinAndSelect("task.ticket", "ticket")
|
||||||
.leftJoinAndSelect("time.admin", "timeAdmin")
|
.leftJoinAndSelect("time.admin", "timeAdmin")
|
||||||
|
.leftJoinAndSelect("task.comments", "comment")
|
||||||
|
.leftJoinAndSelect("comment.user", "commentUser")
|
||||||
|
|
||||||
.loadRelationCountAndMap("task.checkListItemCount", "task.checkListItems")
|
.loadRelationCountAndMap("task.checkListItemCount", "task.checkListItems")
|
||||||
|
|
||||||
@@ -59,6 +61,13 @@ export class TaskRepository extends Repository<TMTask> {
|
|||||||
"timeAdmin.id",
|
"timeAdmin.id",
|
||||||
"timeAdmin.firstName",
|
"timeAdmin.firstName",
|
||||||
"timeAdmin.lastName",
|
"timeAdmin.lastName",
|
||||||
|
|
||||||
|
"comment.id",
|
||||||
|
"comment.content",
|
||||||
|
"comment.createdAt",
|
||||||
|
"commentUser.firstName",
|
||||||
|
"commentUser.lastName",
|
||||||
|
"commentUser.profilePic"
|
||||||
])
|
])
|
||||||
.where("task.id = :taskId", { taskId })
|
.where("task.id = :taskId", { taskId })
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
import { INestApplication } from "@nestjs/common";
|
|
||||||
import { Test, TestingModule } from "@nestjs/testing";
|
|
||||||
import request from "supertest";
|
|
||||||
|
|
||||||
import { AppModule } from "./../src/app.module";
|
|
||||||
|
|
||||||
describe("AppController (e2e)", () => {
|
|
||||||
let app: INestApplication;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
const moduleFixture: TestingModule = await Test.createTestingModule({
|
|
||||||
imports: [AppModule],
|
|
||||||
}).compile();
|
|
||||||
|
|
||||||
app = moduleFixture.createNestApplication();
|
|
||||||
await app.init();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("/ (GET)", () => {
|
|
||||||
return request(app.getHttpServer()).get("/").expect(200).expect("Hello World!");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"moduleFileExtensions": ["js", "json", "ts"],
|
|
||||||
"rootDir": ".",
|
|
||||||
"testEnvironment": "node",
|
|
||||||
"testRegex": ".e2e-spec.ts$",
|
|
||||||
"transform": {
|
|
||||||
"^.+\\.(t|j)s$": "ts-jest"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user