Skip to content

Commit e1a9d25

Browse files
committed
disable postgres logging in tests
1 parent 9f4087d commit e1a9d25

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

test/src/constructor.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { PostgresStore } from "../../src/postgres";
33
describe("instantiate new PostgresStore", () => {
44
it("should create a new instance using a URI", async () => {
55
const db = new PostgresStore(
6-
`postgresql://${process.env.DB_USER}:${process.env.DB_PASSWORD}@${process.env.DB_HOST}:${process.env.DB_PORT}/${process.env.DB_DATABASE}`
6+
`postgresql://${process.env.DB_USER}:${process.env.DB_PASSWORD}@${process.env.DB_HOST}:${process.env.DB_PORT}/${process.env.DB_DATABASE}`,
7+
{ logging: false }
78
);
89

910
expect(db).toBeDefined();
@@ -19,6 +20,7 @@ describe("instantiate new PostgresStore", () => {
1920
password: process.env.DB_PASSWORD!,
2021
host: process.env.DB_HOST!,
2122
port: Number.parseInt(process.env.DB_PORT!),
23+
logging: false,
2224
});
2325

2426
expect(db).toBeDefined();
@@ -34,6 +36,7 @@ describe("instantiate new PostgresStore", () => {
3436
password: "wrong",
3537
host: "notfound",
3638
port: 1234,
39+
logging: false,
3740
});
3841

3942
expect(db).toBeDefined();

test/test-postgres-store.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class TestPostgresStore {
1212
password: process.env.DB_PASSWORD!,
1313
host: process.env.DB_HOST!,
1414
port: Number.parseInt(process.env.DB_PORT!),
15+
logging: false,
1516
})
1617
);
1718
}

0 commit comments

Comments
 (0)