to yield output satisfying

  • <Stream> to yield (output|chunks|objects) satisfying <assertion>
  • <Stream> to yield (output|chunks|objects) satisfying <any+>

Asserts that a stream produces output satisfying a spec.

The output will be concatenated to either a single Buffer or string, depending on what the stream outputs.

return expect(
  require('fs').createReadStream('README.md', { encoding: 'utf-8' }),
  'to yield output satisfying',
  /Node\.js stream plugin/
);