<commit_before>"use strict";

describe('streams |', function () {

    var fse = require('fs-extra');
    var pathUtil = require('path');
    var helper = require('./helper');
    var jetpack = require('..');

    beforeEach(helper.beforeEach);
    afterEach(helper.afterEach);
    
    it("exposes vanilla stream methods", function (done) {
        fse.outputFileSync('a.txt', 'abc');
        
        var output = jetpack.createWriteStream('b.txt');
        var input = jetpack.createReadStream('a.txt');
        output.on('finish', function () {
            expect(fse.readFileSync('b.txt', 'utf8')).toBe('abc');
            done();
        });
        input.pipe(output);
    });
    
});<commit_msg>Added one more test for streams<commit_after>"use strict";

describe('streams |', function () {

    var fse = require('fs-extra');
    var pathUtil = require('path');
    var helper = require('./helper');
    var jetpack = require('..');

    beforeEach(helper.beforeEach);
    afterEach(helper.afterEach);
    
    it("exposes vanilla stream methods", function (done) {
        fse.outputFileSync('a.txt', 'abc');
        
        var output = jetpack.createWriteStream('b.txt');
        var input = jetpack.createReadStream('a.txt');
        output.on('finish', function () {
            expect(fse.readFileSync('b.txt', 'utf8')).toBe('abc');
            done();
        });
        input.pipe(output);
    });
    
    it("stream methods respect jetpack internal CWD", function (done) {
        fse.outputFileSync('dir/a.txt', 'abc');
        var dir = jetpack.cwd('dir');
        var output = dir.createWriteStream('b.txt');
        var input = dir.createReadStream('a.txt');
        output.on('finish', function () {
            expect(fse.readFileSync('dir/b.txt', 'utf8')).toBe('abc');
            done();
        });
        input.pipe(output);
    });
    
});
{'fraction_non_alphanumeric': 0.17609391675560299, 'fraction_numerical': 0.0016008537886872999, 'mean_word_length': 2.4851301115241635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7420804', 'n_tokens_mistral': 561, 'n_tokens_neox': 555, 'n_words': 106}