@@ -147,19 +147,11 @@ test('backup database using location as URL', async (t) => {
147
147
const database = makeSourceDb ( ) ;
148
148
const destDb = pathToFileURL ( nextDb ( ) ) ;
149
149
150
- await backup ( database , destDb , {
151
- rate : 1 ,
152
- progress : progressFn ,
153
- } ) ;
150
+ await backup ( database , destDb ) ;
154
151
155
152
const backupDb = new DatabaseSync ( destDb ) ;
156
153
const rows = backupDb . prepare ( 'SELECT * FROM data' ) . all ( ) ;
157
154
158
- // The source database has two pages - using the default page size -,
159
- // so the progress function should be called once (the last call is not made since
160
- // the promise resolves)
161
- t . assert . strictEqual ( progressFn . mock . calls . length , 1 ) ;
162
- t . assert . deepStrictEqual ( progressFn . mock . calls [ 0 ] . arguments , [ { totalPages : 2 , remainingPages : 1 } ] ) ;
163
155
t . assert . deepStrictEqual ( rows , [
164
156
{ __proto__ : null , key : 1 , value : 'value-1' } ,
165
157
{ __proto__ : null , key : 2 , value : 'value-2' } ,
@@ -184,11 +176,6 @@ test('backup database using location as Buffer', async (t) => {
184
176
const backupDb = new DatabaseSync ( destDb ) ;
185
177
const rows = backupDb . prepare ( 'SELECT * FROM data' ) . all ( ) ;
186
178
187
- // The source database has two pages - using the default page size -,
188
- // so the progress function should be called once (the last call is not made since
189
- // the promise resolves)
190
- t . assert . strictEqual ( progressFn . mock . calls . length , 1 ) ;
191
- t . assert . deepStrictEqual ( progressFn . mock . calls [ 0 ] . arguments , [ { totalPages : 2 , remainingPages : 1 } ] ) ;
192
179
t . assert . deepStrictEqual ( rows , [
193
180
{ __proto__ : null , key : 1 , value : 'value-1' } ,
194
181
{ __proto__ : null , key : 2 , value : 'value-2' } ,
0 commit comments