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

Function assertStmt

test/13.database.prepare.js:12–19  ·  view source on GitHub ↗
(stmt, source, db, reader, readonly)

Source from the content-addressed store, hash-verified

10 });
11
12 function assertStmt(stmt, source, db, reader, readonly) {
13 expect(stmt.source).to.equal(source);
14 expect(stmt.constructor.name).to.equal('Statement');
15 expect(stmt.database).to.equal(db);
16 expect(stmt.reader).to.equal(reader);
17 expect(stmt.readonly).to.equal(readonly);
18 expect(() => new stmt.constructor(source)).to.throw(TypeError);
19 }
20
21 it('should throw an exception if a string is not provided', function () {
22 expect(() => this.db.prepare(123)).to.throw(TypeError);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected