MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / expectBusy

Function expectBusy

test/33.database.aggregate.js:356–363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

354 it('should cause the database to become busy when executing the aggregate', function () {
355 let checkCount = 0;
356 const expectBusy = () => {
357 expect(() => this.db.exec('SELECT a()')).to.throw(TypeError);
358 expect(() => this.db.prepare('SELECT 555')).to.throw(TypeError);
359 expect(() => this.db.pragma('cache_size')).to.throw(TypeError);
360 expect(() => this.db.function('x', () => {})).to.throw(TypeError);
361 expect(() => this.db.aggregate('y', { step: () => {} })).to.throw(TypeError);
362 checkCount += 1;
363 };
364 this.db.aggregate('a', { step: () => {} });
365 this.db.aggregate('b', { start: expectBusy, step: expectBusy, inverse: expectBusy, result: expectBusy });
366

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected