Skip to content

Commit 62bf524

Browse files
refactor: remove console.logs from the test
1 parent 352c1f5 commit 62bf524

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

test/functional/action-params.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe("action parameters", () => {
3939
let uploadedFilesFirstName: string;
4040
let uploadedFilesSecondName: string;
4141
let requestReq: any, requestRes: any;
42-
42+
4343
beforeEach(() => {
4444
paramUserId = undefined;
4545
paramFirstId = undefined;
@@ -375,7 +375,6 @@ describe("action parameters", () => {
375375

376376
describe("@Session(param) should allow to inject empty property", () => {
377377
assertRequest([3001, 3002], "get", "session-param-empty", response => {
378-
console.log(response.body);
379378
expect(response).to.be.status(200);
380379
expect(response).to.have.header("content-type", "text/html; charset=utf-8");
381380
expect(response.body).to.be.equal("<html><body>true</body></html>");
@@ -829,7 +828,7 @@ describe("action parameters", () => {
829828
assertRequest([3001, 3002], "post", "photos-with-required", undefined, {}, response => {
830829
expect(response).to.be.status(400);
831830
});
832-
831+
833832
});
834833

835834
});

test/functional/express-error-handling.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe("express error handling", () => {
1818
errorHandlerCalled = undefined;
1919
errorHandledSpecifically = undefined;
2020
});
21-
21+
2222
before(() => {
2323

2424
// reset metadata args storage
@@ -29,7 +29,7 @@ describe("express error handling", () => {
2929

3030
error(error: any, request: any, response: any, next?: Function): any {
3131
errorHandlerCalled = true;
32-
console.log("ERROR HANDLED GLOBALLY: ", error);
32+
// ERROR HANDLED GLOBALLY
3333
next(error);
3434
}
3535

@@ -39,7 +39,7 @@ describe("express error handling", () => {
3939

4040
error(error: any, request: any, response: any, next?: Function): any {
4141
errorHandledSpecifically = true;
42-
console.log("ERROR HANDLED SPECIFICALLY: ", error);
42+
// ERROR HANDLED SPECIFICALLY
4343
next(error);
4444
}
4545

@@ -48,9 +48,9 @@ describe("express error handling", () => {
4848
class SoftErrorHandler implements ExpressErrorMiddlewareInterface {
4949

5050
error(error: any, request: any, response: any, next?: Function): any {
51-
console.log("ERROR WAS IGNORED: ", error);
52-
next();
53-
}
51+
// ERROR WAS IGNORED
52+
next();
53+
}
5454

5555
}
5656

@@ -96,7 +96,7 @@ describe("express error handling", () => {
9696
photos() {
9797
return "1234";
9898
}
99-
99+
100100
}
101101
});
102102

test/functional/express-global-before-error-handling.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ describe("custom express global before middleware error handling", () => {
3131
@Middleware({ type: "before" })
3232
class GlobalBeforeMiddleware implements ExpressMiddlewareInterface {
3333
use(request: any, response: any, next?: Function): any {
34-
console.log("GLOBAL BEFORE MIDDLEWARE CALLED");
3534
throw new CustomError();
3635
}
3736
}

test/functional/redirect-decorator.spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,17 @@ describe("dynamic redirect", function () {
3434
@Get("/template")
3535
@Redirect("/users/:owner")
3636
template() {
37-
// console.log("/template");
3837
return {owner: "pleerock", repo: "routing-controllers"};
3938
}
4039

4140
@Get("/original")
4241
@Redirect("/users/pleerock")
4342
original() {
44-
// console.log("/original");
4543
}
4644

4745
@Get("/override")
4846
@Redirect("https://api.github.com")
4947
override() {
50-
// console.log("/override");
5148
return "/users/pleerock";
5249
}
5350

0 commit comments

Comments
 (0)