<commit_before>'use strict';
require('mocha');
require('chai').should();

var png2psd = require('../'),
    fs = require('fs'),
    path = require('path'),
    fixturesDir = path.join(__dirname, './fixtures/');
    
describe('png2psd', function() {

  it('should convert RGB PNG file to RGB PSD file.', function(done) {
    this.timeout(8000);
    test('rgb', done);
  });

  it('should convert RGBA PNG file to RGBA PSD file.', function(done) {
    this.timeout(8000);
    test('rgba', done);
  });

  it('should convert Grayscale PNG file ' + 
     'to Grayscale PSD file.', function(done) {
    this.timeout(8000);
    test('gray', done);
  });

  it('should convert Grayscale (with Alpha) PNG file ' +
     'to Grayscale (with Alpha) PSD file.', function(done) {
    this.timeout(8000);
    test('graya', done);
  });

});

function test(colorspace, done) {
  var pngFilePath = path.join(fixturesDir, colorspace + '.png');
  var psdFilePath = path.join(fixturesDir, colorspace + '.psd');
  
  // conver
  png2psd(pngFilePath, function(psdFileBuffer) {
    // read comparison file
    fs.readFile(psdFilePath, function(err, buffer) {
      if (err) return done(err);
      psdFileBuffer.should.to.deep.equal(buffer);
      done();
    });
  });
}

<commit_msg>Modify: timeout setting<commit_after>'use strict';
require('mocha');
require('chai').should();

var png2psd = require('../'),
    fs = require('fs'),
    path = require('path'),
    fixturesDir = path.join(__dirname, './fixtures/');
    
describe('png2psd', function() {

  it('should convert RGB PNG file to RGB PSD file.', function(done) {
    this.timeout(15000);
    test('rgb', done);
  });

  it('should convert RGBA PNG file to RGBA PSD file.', function(done) {
    this.timeout(15000);
    test('rgba', done);
  });

  it('should convert Grayscale PNG file ' + 
     'to Grayscale PSD file.', function(done) {
    this.timeout(15000);
    test('gray', done);
  });

  it('should convert Grayscale (with Alpha) PNG file ' +
     'to Grayscale (with Alpha) PSD file.', function(done) {
    this.timeout(15000);
    test('graya', done);
  });

});

function test(colorspace, done) {
  var pngFilePath = path.join(fixturesDir, colorspace + '.png');
  var psdFilePath = path.join(fixturesDir, colorspace + '.psd');
  
  // conver
  png2psd(pngFilePath, function(psdFileBuffer) {
    // read comparison file
    fs.readFile(psdFilePath, function(err, buffer) {
      if (err) return done(err);
      psdFileBuffer.should.to.deep.equal(buffer);
      done();
    });
  });
}


{'fraction_non_alphanumeric': 0.17125984251968504, 'fraction_numerical': 0.01653543307086614, 'mean_word_length': 3.4191304347826086, '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': '7006403', 'n_tokens_mistral': 907, 'n_tokens_neox': 829, 'n_words': 202}