Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
samwillis committed Dec 8, 2024
1 parent 8b2568f commit 4278d46
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions packages/pglite-sync/test/sync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,10 @@ describe('pglite-sync', () => {

const batchSize = 5
const shape = await pg.electric.syncShapeToTable({
shape: { url: 'http://localhost:3000/v1/shape', table: 'todo' },
shape: {
url: 'http://localhost:3000/v1/shape',
params: { table: 'todo' },
},
table: 'todo',
primaryKey: ['id'],
commitGranularity: batchSize,
Expand Down Expand Up @@ -844,7 +847,10 @@ describe('pglite-sync', () => {
})

const shape = await pg.electric.syncShapeToTable({
shape: { url: 'http://localhost:3000/v1/shape', table: 'todo' },
shape: {
url: 'http://localhost:3000/v1/shape',
params: { table: 'todo' },
},
table: 'todo',
primaryKey: ['id'],
commitGranularity: 'transaction',
Expand Down Expand Up @@ -942,7 +948,10 @@ describe('pglite-sync', () => {
})

const shape = await pg.electric.syncShapeToTable({
shape: { url: 'http://localhost:3000/v1/shape', table: 'todo' },
shape: {
url: 'http://localhost:3000/v1/shape',
params: { table: 'todo' },
},
table: 'todo',
primaryKey: ['id'],
commitGranularity: 'up-to-date',
Expand Down Expand Up @@ -1018,7 +1027,10 @@ describe('pglite-sync', () => {
})

const shape = await pg.electric.syncShapeToTable({
shape: { url: 'http://localhost:3000/v1/shape', table: 'todo' },
shape: {
url: 'http://localhost:3000/v1/shape',
params: { table: 'todo' },
},
table: 'todo',
primaryKey: ['id'],
commitGranularity: 'operation',
Expand Down Expand Up @@ -1099,7 +1111,10 @@ describe('pglite-sync', () => {

const throttleMs = 15 // Short throttle for testing
const shape = await pg.electric.syncShapeToTable({
shape: { url: 'http://localhost:3000/v1/shape', table: 'todo' },
shape: {
url: 'http://localhost:3000/v1/shape',
params: { table: 'todo' },
},
table: 'todo',
primaryKey: ['id'],
commitGranularity: 'operation',
Expand Down Expand Up @@ -1186,7 +1201,10 @@ describe('pglite-sync', () => {

const onInitialSync = vi.fn()
const shape = await pg.electric.syncShapeToTable({
shape: { url: 'http://localhost:3000/v1/shape', table: 'todo' },
shape: {
url: 'http://localhost:3000/v1/shape',
params: { table: 'todo' },
},
table: 'todo',
primaryKey: ['id'],
onInitialSync,
Expand Down

0 comments on commit 4278d46

Please sign in to comment.