Files: d456a6cc8589489e558e6164750474ed2cfc961e / 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