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

Function length

test/32.database.function.js:38–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 });
37 it('should throw an exception if function.length is invalid', function () {
38 const length = x => Object.defineProperty(() => {}, 'length', { value: x });
39 expect(() => this.db.function('a', length(undefined))).to.throw(TypeError);
40 expect(() => this.db.function('b', length(null))).to.throw(TypeError);
41 expect(() => this.db.function('c', length('2'))).to.throw(TypeError);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected