<commit_before>var should = require('should');
var gutil = require('gulp-util');
var haml = require('../');
var fs = require('fs');

require('mocha');

describe('gulp haml', function(){
  it('should render haml .haml to HTML .html', function(done){
    var hamlStream = haml();

    var fakeFile = new gutil.File({
      base: "test/src/",
      cwd: "test/",
      path: "test/src/haml.haml",
      contents: fs.readFileSync('test/src/haml.haml', 'utf8')
    });

    hamlStream.once('data', function(newFile){
      should.exist(newFile);
      should.exist(newFile.path);
      should.exist(newFile.contents);
      String(newFile.contents).should.equal(fs.readFileSync('test/expected/haml.html', 'utf8'));
      done();
    });
    hamlStream.write(fakeFile);
  });
});<commit_msg>fix tests readFileSync<commit_after>var should = require('should');
var gutil = require('gulp-util');
var haml = require('../');
var fs = require('fs');

require('mocha');

describe('gulp haml', function(){
  it('should render haml .haml to HTML .html', function(done){
    var hamlStream = haml();

    var fakeFile = new gutil.File({
      base: "test/src",
      cwd: "test/",
      path: "test/src/haml.haml",
      contents: fs.readFileSync('test/src/haml.haml')
    });

    hamlStream.once('data', function(newFile){
      should.exist(newFile);
      should.exist(newFile.path);
      should.exist(newFile.contents);
      String(newFile.contents).should.equal(fs.readFileSync('test/expected/haml.html', 'utf8'));
      done();
    });
    hamlStream.write(fakeFile);
  });
});
{'fraction_non_alphanumeric': 0.18853503184713377, 'fraction_numerical': 0.001910828025477707, 'mean_word_length': 3.4757834757834756, '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': '3337748', 'n_tokens_mistral': 540, 'n_tokens_neox': 531, 'n_words': 99}