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

Function length

test/34.database.table.js:87–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 });
86 it('should throw an exception if generator.length is invalid', function () {
87 const length = x => Object.defineProperty(function*(){}, 'length', { value: x });
88 expect(() => this.db.table('a', { columns: ['x'], rows: length(undefined) })).to.throw(TypeError);
89 expect(() => this.db.table('b', { columns: ['x'], rows: length(null) })).to.throw(TypeError);
90 expect(() => this.db.table('c', { columns: ['x'], rows: length('1') })).to.throw(TypeError);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected