diff --git a/packages/pglite-sync/test/sync.test.ts b/packages/pglite-sync/test/sync.test.ts index 32d8f3f7..63da40e3 100644 --- a/packages/pglite-sync/test/sync.test.ts +++ b/packages/pglite-sync/test/sync.test.ts @@ -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'], }) @@ -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'], }) @@ -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', @@ -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', @@ -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', @@ -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'], }) @@ -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'], }) @@ -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, @@ -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,