mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
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:
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/,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user