We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0328cb3 commit 1d9c68eCopy full SHA for 1d9c68e
packages/pg-transaction/src/index.test.ts
@@ -54,6 +54,12 @@ describe('Transaction', () => {
54
const { rowCount } = await innerClient.query('SELECT * FROM test_table')
55
assert.equal(rowCount, 0, 'Temp table should still be empty inside transaction')
56
})
57
+
58
+ // now that the transaction is committed, the changes are visible outside
59
+ await withClient(async (innerClient) => {
60
+ const { rowCount } = await innerClient.query('SELECT * FROM test_table')
61
+ assert.equal(rowCount, 1, 'Row should be inserted after transaction commits')
62
+ })
63
64
65
0 commit comments