https://github.com/dmitriym09/stream-storage-chai-http
Simple node stream for using with chai-http.
https://github.com/dmitriym09/stream-storage-chai-http
buffer cache chai chai-http duplex js memory nodejs stream test
Last synced: 6 months ago
JSON representation
Simple node stream for using with chai-http.
- Host: GitHub
- URL: https://github.com/dmitriym09/stream-storage-chai-http
- Owner: dmitriym09
- Created: 2019-08-15T06:03:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T23:54:34.000Z (over 3 years ago)
- Last Synced: 2025-10-12T08:11:35.329Z (8 months ago)
- Topics: buffer, cache, chai, chai-http, duplex, js, memory, nodejs, stream, test
- Language: JavaScript
- Homepage:
- Size: 149 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stream-storage-chai-http


Simple [stream](https://github.com/dmitriym09/stream-storage) for using with [chai-http](https://github.com/chaijs/chai-http).
```
npm install stream-storage-chai-http -D
```
## Usage
```js
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
* dmitriym09
## dev
### test
For run test:
```js
npm run test
```
## versions
- **0.0.1** - init
- **0.0.2** - tags