@@ -20,14 +20,14 @@ import { createMemorySheets } from '../__tests__/memory-sheets.js'
2020/**
2121 * Strip metadata timestamp columns from a 2D rows array.
2222 *
23- * The destination stamps `_synced_at `; the source may stamp `_updated_at`.
23+ * The destination stamps `_last_synced_at `; the source may stamp `_updated_at`.
2424 * Most tests only care about source data, so drop both at assertion sites.
2525 */
2626function stripUpdatedAt ( rows : unknown [ ] [ ] | undefined ) : unknown [ ] [ ] {
2727 if ( ! rows || rows . length === 0 ) return rows ?? [ ]
2828 const header = rows [ 0 ] as unknown [ ]
2929 const indexes = new Set (
30- [ '_updated_at' , '_synced_at ' ] . map ( ( name ) => header . indexOf ( name ) ) . filter ( ( idx ) => idx >= 0 )
30+ [ '_updated_at' , '_last_synced_at ' ] . map ( ( name ) => header . indexOf ( name ) ) . filter ( ( idx ) => idx >= 0 )
3131 )
3232 if ( indexes . size === 0 ) return rows
3333 return rows . map ( ( row ) => row . filter ( ( _ , i ) => ! indexes . has ( i ) ) )
@@ -1786,9 +1786,9 @@ describe('_updated_at column (source-owned, passthrough)', () => {
17861786 )
17871787
17881788 const rows = getData ( getSpreadsheetIds ( ) [ 0 ] , 'users' ) !
1789- expect ( rows [ 0 ] ) . toEqual ( [ 'id' , 'name' , '_synced_at ' ] )
1789+ expect ( rows [ 0 ] ) . toEqual ( [ 'id' , 'name' , '_last_synced_at ' ] )
17901790 expect ( rows [ 0 ] ) . not . toContain ( '_updated_at' )
1791- const syncedAtIdx = ( rows [ 0 ] as string [ ] ) . indexOf ( '_synced_at ' )
1791+ const syncedAtIdx = ( rows [ 0 ] as string [ ] ) . indexOf ( '_last_synced_at ' )
17921792 expect ( syncedAtIdx ) . toBeGreaterThanOrEqual ( 0 )
17931793 expect ( Date . parse ( String ( rows [ 1 ] [ syncedAtIdx ] ) ) ) . not . toBeNaN ( )
17941794 } )
@@ -2062,7 +2062,7 @@ describe('getStaleRecords', () => {
20622062 ] ,
20632063 }
20642064
2065- it ( 'returns ids whose _synced_at predates syncRunStartedAt' , async ( ) => {
2065+ it ( 'returns ids whose _last_synced_at predates syncRunStartedAt' , async ( ) => {
20662066 const { sheets, getSpreadsheetIds } = createMemorySheets ( )
20672067 const dest = createDestination ( sheets )
20682068
@@ -2091,7 +2091,7 @@ describe('getStaleRecords', () => {
20912091 expect ( batches ) . toEqual ( [ { stream : 'customer' , ids : [ 'cus_1' , 'cus_2' ] } ] )
20922092 } )
20932093
2094- it ( 'does not return rows whose _synced_at is at or after syncRunStartedAt' , async ( ) => {
2094+ it ( 'does not return rows whose _last_synced_at is at or after syncRunStartedAt' , async ( ) => {
20952095 const { sheets, getSpreadsheetIds } = createMemorySheets ( )
20962096 const dest = createDestination ( sheets )
20972097
0 commit comments