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

Class

test/24.statement.bind.js:86–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 it('should not treat class instances as plain objects', function () {
85 const stmt = this.db.prepare('INSERT INTO entries VALUES (@a, @a, ?)');
86 expect(() => stmt.bind(new (class { get a() { return "123"; } })(), null)).to.throw(TypeError);
87 expect(() => stmt.bind(Object.assign(new Date(), { a: 123 }), null)).to.throw(TypeError);
88 expect(() => stmt.bind(Object.assign(new Number(123), { a: 123 }), null)).to.throw(TypeError);
89 expect(() => stmt.bind(Object.assign(() => {}, { a: 123 }), null)).to.throw(TypeError);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected