| 72 | }); |
| 73 | it('should throw an exception if generator.length is invalid', function () { |
| 74 | const length = x => Object.defineProperty(function*(){}, 'length', { value: x }); |
| 75 | expect(() => this.db.table('a', { columns: ['x'], rows: length(undefined) })).to.throw(TypeError); |
| 76 | expect(() => this.db.table('b', { columns: ['x'], rows: length(null) })).to.throw(TypeError); |
| 77 | expect(() => this.db.table('c', { columns: ['x'], rows: length('1') })).to.throw(TypeError); |