sqlite: add some tests

PR-URL: https://github.com/nodejs/node/pull/61410
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Guilherme Araújo authored and Antoine du Hamel committed 2026-01-27 22:52:29 +01:00
1 parent b3a7a8c780
commit 27117625df
2 files changed
+24

No files matched your search

@@ -68,6 +68,19 @@ describe('DatabaseSync.prototype.aggregate()', () => {
message: /The "options\.directOnly" argument must be a boolean/,
});
});
test('throws if options.inverse is not a function', (t) => {
t.assert.throws(() => {
db.aggregate('sum', {
start: 0,
step: (acc, value) => acc + value,
inverse: 10
});
}, {
code: 'ERR_INVALID_ARG_TYPE',
message: /The "options\.inverse" argument must be a function/,
});
});
});
});