Skip to content

Commit f6eb2da

Browse files
committed
Fixed test not using transaction object.
1 parent 95adf91 commit f6eb2da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/drizzle-driver/tests/sqlite/db.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ describe('Database operations', () => {
5050
expect(result!.name).toEqual('James Smith');
5151
});
5252

53-
it('should insert a user and update that user within a transaction when raw sql is used', async () => {
53+
it.only('should insert a user and update that user within a transaction when raw sql is used', async () => {
5454
await db.transaction(async (transaction) => {
5555
await transaction.run(sql`INSERT INTO users (id, name) VALUES ('4', 'James');`);
56-
await db.update(drizzleUsers).set({ name: 'James Smith' }).where(eq(drizzleUsers.name, 'James'));
56+
await transaction.update(drizzleUsers).set({ name: 'James Smith' }).where(eq(drizzleUsers.name, 'James'));
5757
});
5858

5959
const result = await db.select().from(drizzleUsers).get();

0 commit comments

Comments
 (0)