Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
azk / usr / lib / azk / node_modules / memory-streams / test / test-readablestream.js
Size: Mime:
var streams = require('../')
  , should  = require('should');

// Definition
streams.should.not.be.undefined;
streams.should.have.property('ReadableStream');

// Read method
var reader = new streams.ReadableStream('Hello World\n');
reader.read().toString().should.equal('Hello World\n');
should.not.exist(reader.read());

// Append method
reader.append('Hello Universe\n');
reader.read().toString().should.equal('Hello Universe\n');

// Done
console.log( '> ReadableStream tests complete.');