Files: c5c7a8ffadbd51aa28a5f3f096fe43f69405da44 / test / test-79-npm / readable-stream / readable-stream.js
384 bytesRaw
1 | ; |
2 | |
3 | var fs = require('fs'); |
4 | var path = require('path'); |
5 | var fst = fs.createReadStream(path.join(__dirname, 'readable-stream.js')); |
6 | var Readable = require('readable-stream'); |
7 | var rst = new Readable(); |
8 | rst.wrap(fst); |
9 | |
10 | setTimeout(function () { |
11 | var test = '\'use strict\';'; |
12 | var c = rst.read(test.length); |
13 | if (c.toString() === test) { |
14 | console.log('ok'); |
15 | } |
16 | }, 100); |
17 |
Built with git-ssb-web