mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
sqlite: add timeout options to DatabaseSync
PR-URL: https://github.com/nodejs/node/pull/57752 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
1 parent
ce1b5aabd4
commit
0df87e07a0
5 files changed
+112
No files matched your search
@@ -77,6 +77,15 @@ suite('DatabaseSync() constructor', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('throws if options.timeout is provided but is not an integer', (t) => {
|
||||
t.assert.throws(() => {
|
||||
new DatabaseSync('foo', { timeout: .99 });
|
||||
}, {
|
||||
code: 'ERR_INVALID_ARG_TYPE',
|
||||
message: /The "options\.timeout" argument must be an integer/,
|
||||
});
|
||||
});
|
||||
|
||||
test('is not read-only by default', (t) => {
|
||||
const dbPath = nextDb();
|
||||
const db = new DatabaseSync(dbPath);
|
||||
|
||||
Reference in new issue
Block a user