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 2d58c46 commit 960163a
Showing 1 changed file with 36 additions and 9 deletions.
45 changes: 36 additions & 9 deletions packages/pglite-sync/test/sync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,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'],
})
Expand Down Expand Up @@ -121,7 +124,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'],
})
Expand Down Expand Up @@ -201,7 +207,10 @@ describe('pglite-sync', () => {
const numResumes = 3
for (let i = 0; i < numResumes; i++) {
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'],
shapeKey: 'foo',
Expand Down Expand Up @@ -270,7 +279,10 @@ describe('pglite-sync', () => {

const numInserts = 100
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'],
shapeKey: 'foo',
Expand Down Expand Up @@ -334,7 +346,10 @@ describe('pglite-sync', () => {

// resuming should
const resumedShape = 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'],
shapeKey: 'foo',
Expand Down Expand Up @@ -375,7 +390,10 @@ describe('pglite-sync', () => {
const altTable = 'bar'

const shape1 = await pg.electric.syncShapeToTable({
shape: { url: 'http://localhost:3000/v1/shape', table: 'todo' },
shape: {
url: 'http://localhost:3000/v1/shape',
params: { table: 'todo' },
},
table: table,
primaryKey: ['id'],
})
Expand Down Expand Up @@ -420,7 +438,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'],
})
Expand Down Expand Up @@ -548,7 +569,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'],
useCopy: true,
Expand Down Expand Up @@ -624,7 +648,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'],
useCopy: true,
Expand Down

0 comments on commit 960163a

Please sign in to comment.