0.0.2 • Published 5 years ago

stream-storage-chai-http v0.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

stream-storage-chai-http

Version npm

Simple stream for using with chai-http.

npm install stream-storage-chai-http -D

Usage

const { StreamStorage } = require('stream-storage');
const streamStorage = new StreamStorage();

const server = require('./server');
const requester = chai.request(server).keepOpen();

streamStorage.put('HI')
    .then(() => {
        requester.post('/')
            .attach('file', streamStorage, 'test.txt')
            .end((err, res) => {
                streamStorage.destroy();
                //...
            });
    });

Contributors

dev

test

For run test:

npm run test

versions

  • 0.0.1 - init
  • 0.0.2 - tags