Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T23:54:34.000Z (almost 2 years ago)
- Last Synced: 2024-03-25T13:22:09.909Z (8 months ago)
- Topics: buffer, cache, chai, chai-http, duplex, js, memory, nodejs, stream, test
- Language: JavaScript
- Homepage:
- Size: 149 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stream-storage-chai-http
![Version](https://img.shields.io/badge/version-0.0.2-green.svg)
![npm](https://img.shields.io/npm/dy/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