filestream.test.ignored.ts 788 B

123456789101112131415161718192021222324
  1. // import * as assert from 'assert'
  2. // import { Source } from '../src/Source'
  3. // import * as Sink from '../src/Sink'
  4. // import * as fs from 'fs'
  5. // describe('file stream', function () {
  6. // this.timeout(5000)
  7. // // it('should run a stream from a file', async () => {
  8. // // const value = await Source.fromReadableBuilder<Buffer>(() => fs.createReadStream('./resources/test/numbers.txt'))
  9. // // .map(v => v.toString('utf-8').split('\n'))
  10. // // .map(numbers =>
  11. // // numbers
  12. // // .split(/\s+/)
  13. // // .filter(v => v.length > 0)
  14. // // .map(v => parseInt(v, 10))
  15. // // .reduce((a, b) => a + b, 0),
  16. // // )
  17. // // .into(Sink.sum)
  18. // // .run()
  19. // // assert.strictEqual(value, 525896510)
  20. // // })
  21. // })