Skip to content

Commit

Permalink
test: remove console logging from tests (#6880)
Browse files Browse the repository at this point in the history
we have a bunch of console loggers in our tests that cause
extra output to be emitted when we don't need it.  because
these were for debugging & not part of the tests success
this removes them
  • Loading branch information
imnotjames committed Oct 9, 2020
1 parent ec93922 commit 54067be
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {InsertEvent} from "../../../../../../src/subscriber/event/InsertEvent";

@EventSubscriber()
export class TestBlogSubscriber implements EntitySubscriberInterface {

/**
* Called after entity insertion.
*/
beforeInsert(event: InsertEvent<any>) {
console.log(`BEFORE ENTITY INSERTED: `, event.entity);
// Do nothing
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {InsertEvent} from "../../../../../../src/subscriber/event/InsertEvent";

@EventSubscriber()
export class TestQuestionSubscriber implements EntitySubscriberInterface {

/**
* Called before entity insertion.
*/
beforeInsert(event: InsertEvent<any>) {
console.log(`BEFORE ENTITY INSERTED: `, event.entity);
// Do nothing
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {InsertEvent} from "../../../../../../src/subscriber/event/InsertEvent";

@EventSubscriber()
export class TestVideoSubscriber implements EntitySubscriberInterface {

/**
* Called after entity insertion.
*/
beforeInsert(event: InsertEvent<any>) {
console.log(`BEFORE ENTITY INSERTED: `, event.entity);
// Do nothing
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {InsertEvent} from "../../../../src/subscriber/event/InsertEvent";

@EventSubscriber()
export class FirstConnectionSubscriber implements EntitySubscriberInterface {

/**
* Called after entity insertion.
*/
beforeInsert(event: InsertEvent<any>) {
console.log(`BEFORE ENTITY INSERTED: `, event.entity);
// Do nothing
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {InsertEvent} from "../../../../src/subscriber/event/InsertEvent";

@EventSubscriber()
export class SecondConnectionSubscriber implements EntitySubscriberInterface {

/**
* Called after entity insertion.
*/
beforeInsert(event: InsertEvent<any>) {
console.log(`BEFORE ENTITY INSERTED: `, event.entity);
// Do nothing
}

}
}
1 change: 0 additions & 1 deletion test/functional/migrations/generate-command/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ describe("migrations > generate command", () => {

const sqlInMemory = await connection.driver.createSchemaBuilder().log();

console.log(sqlInMemory.upQueries);
sqlInMemory.upQueries.length.should.be.equal(0);
sqlInMemory.downQueries.length.should.be.equal(0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ describe("persistence > custom-column-names", function() {
return connection
.synchronize(true)
.catch(e => {
console.log("Error during schema re-creation: ", e);
throw e;
});
}
Expand All @@ -53,7 +52,7 @@ describe("persistence > custom-column-names", function() {
// -------------------------------------------------------------------------
// Specifications
// -------------------------------------------------------------------------

describe("attach exist entity to exist entity with many-to-one relation", function() {
if (!connection)
return;
Expand Down
4 changes: 0 additions & 4 deletions test/github-issues/2703/memory-logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ export class MemoryLogger implements Logger {

log(level: "log" | "info" | "warn", message: any) {}

writeToConsole() {
this.queries.forEach(q => console.log(`query: ${q}`));
}

clear() {
this._queries = [];
}
Expand Down

0 comments on commit 54067be

Please sign in to comment.