Skip to content

Commit 4561203

Browse files
committed
test: remove unneeded comments
1 parent 87f6b16 commit 4561203

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

test/parallel/test-sqlite-backup.mjs

+2-20
Original file line numberDiff line numberDiff line change
@@ -143,23 +143,14 @@ test('database backup', async (t) => {
143143
});
144144

145145
test('backup database using location as URL', async (t) => {
146-
const progressFn = t.mock.fn();
147146
const database = makeSourceDb();
148147
const destDb = pathToFileURL(nextDb());
149148

150-
await backup(database, destDb, {
151-
rate: 1,
152-
progress: progressFn,
153-
});
149+
await backup(database, destDb);
154150

155151
const backupDb = new DatabaseSync(destDb);
156152
const rows = backupDb.prepare('SELECT * FROM data').all();
157153

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 }]);
163154
t.assert.deepStrictEqual(rows, [
164155
{ __proto__: null, key: 1, value: 'value-1' },
165156
{ __proto__: null, key: 2, value: 'value-2' },
@@ -172,23 +163,14 @@ test('backup database using location as URL', async (t) => {
172163
});
173164

174165
test('backup database using location as Buffer', async (t) => {
175-
const progressFn = t.mock.fn();
176166
const database = makeSourceDb();
177167
const destDb = Buffer.from(nextDb());
178168

179-
await backup(database, destDb, {
180-
rate: 1,
181-
progress: progressFn,
182-
});
169+
await backup(database, destDb);
183170

184171
const backupDb = new DatabaseSync(destDb);
185172
const rows = backupDb.prepare('SELECT * FROM data').all();
186173

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 }]);
192174
t.assert.deepStrictEqual(rows, [
193175
{ __proto__: null, key: 1, value: 'value-1' },
194176
{ __proto__: null, key: 2, value: 'value-2' },

0 commit comments

Comments
 (0)