Skip to content

Commit e953707

Browse files
committed
fix: test
1 parent 9347caa commit e953707

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/postgres/__tests__/base-pg-store.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,18 @@ describe('BasePgStore', () => {
9292
});
9393

9494
test('postgres transaction connection integrity', async () => {
95-
const usageName = 'postgres:test;datastore-crud';
9695
const obj = db.sql;
96+
const dbName = obj.options.database;
9797

9898
expect(sqlTransactionContext.getStore()).toBeUndefined();
9999
await db.sqlTransaction(async sql => {
100-
// Transaction flag is open.
101-
expect(sqlTransactionContext.getStore()?.usageName).toBe(usageName);
102100
// New connection object.
103101
const newObj = sql;
104102
expect(obj).not.toEqual(newObj);
105-
expect(sqlTransactionContext.getStore()?.sql).toEqual(newObj);
103+
expect(sqlTransactionContext.getStore()?.[dbName]).toEqual(newObj);
106104

107105
// Nested tx uses the same connection object.
108106
await db.sqlTransaction(sql => {
109-
expect(sqlTransactionContext.getStore()?.usageName).toBe(usageName);
110107
expect(newObj).toEqual(sql);
111108
});
112109

0 commit comments

Comments
 (0)