-
Notifications
You must be signed in to change notification settings - Fork 16
Fix writes through ENSDb Client #1711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,12 @@ describe("EnsDbClient", () => { | |
| const onConflictDoUpdateMock = vi.fn(async () => undefined); | ||
| const valuesMock = vi.fn(() => ({ onConflictDoUpdate: onConflictDoUpdateMock })); | ||
| const insertMock = vi.fn(() => ({ values: valuesMock })); | ||
| const dbMock = { select: selectMock, insert: insertMock }; | ||
| const executeMock = vi.fn(async () => undefined); | ||
| const txMock = { insert: insertMock, execute: executeMock }; | ||
| const transactionMock = vi.fn(async (callback: (tx: typeof txMock) => Promise<void>) => | ||
| callback(txMock), | ||
| ); | ||
| const dbMock = { select: selectMock, insert: insertMock, transaction: transactionMock }; | ||
|
Comment on lines
+30
to
+35
|
||
|
|
||
| beforeEach(() => { | ||
| selectResult.current = []; | ||
|
|
@@ -37,6 +42,8 @@ describe("EnsDbClient", () => { | |
| onConflictDoUpdateMock.mockClear(); | ||
| valuesMock.mockClear(); | ||
| insertMock.mockClear(); | ||
| executeMock.mockClear(); | ||
| transactionMock.mockClear(); | ||
| vi.mocked(makeDrizzle).mockReturnValue(dbMock as unknown as ReturnType<typeof makeDrizzle>); | ||
| }); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.