()
| 371 | |
| 372 | // https://github.com/hapijs/shot/blob/master/test/index.js#L836 |
| 373 | function getStream () { |
| 374 | const Read = function () { |
| 375 | Stream.Readable.call(this) |
| 376 | } |
| 377 | util.inherits(Read, Stream.Readable) |
| 378 | const word = '{"hello":"world"}' |
| 379 | let i = 0 |
| 380 | |
| 381 | Read.prototype._read = function (size) { |
| 382 | this.push(word[i] ? word[i++] : null) |
| 383 | } |
| 384 | |
| 385 | return new Read() |
| 386 | } |
| 387 | |
| 388 | test('should error the promise if ready errors', (t, done) => { |
| 389 | t.plan(3) |