mirror of
https://github.com/hanzoai/better-sqlite3-multiple-ciphers.git
synced 2026-09-24 16:57:19 +00:00
Calculate timeout test delta from the given timeout
Co-authored-by: Joshua Wise <[email protected]>
This commit is contained in:
co-authored by
Joshua Wise
parent
87cc6a7d0b
commit
49c9688037
@@ -98,7 +98,7 @@ describe('new Database()', function () {
|
||||
const start = Date.now();
|
||||
expect(() => db.exec('BEGIN EXCLUSIVE')).to.throw(Database.SqliteError).with.property('code', 'SQLITE_BUSY');
|
||||
const end = Date.now();
|
||||
expect(end - start).to.be.closeTo(timeout, 1200);
|
||||
expect(end - start).to.be.within(timeout - 1, timeout * 3 + 100);
|
||||
} finally {
|
||||
db.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user