<commit_before>// Load in parts to make our content
var smith = require('../lib/gmsmith'),
    extend = require('obj-extend'),
    commonTest = require('spritesmith-engine-test').content;

// Duck punch over test items
var content = extend({}, commonTest, {
  'gmsmith': function () {
    this.smith = smith;
    smith.set({imagemagick: process.env.TEST_IMAGEMAGICK});

    var expectedDir = __dirname + '/expected_files/';
    this.expectedFilepaths = [
      expectedDir + '/multiple.png',
      expectedDir + '/multiple2.png',
      expectedDir + '/multiple3.png'
    ];
  },
  'can output an image':  function () {
    // Assert the actual image is the same expected
    var actualImage = this.result,
        matchesAnImage = false;

    // ANTI-PATTERN: Looping over set without identifiable lines for stack traces
    var fs = require('fs');
    var expect = require('chai').expect;
    this.expectedFilepaths.forEach(function testAgainstExpected (filepath) {
      if (!matchesAnImage) {
        var expectedImage = fs.readFileSync(filepath, 'binary');
        matchesAnImage = actualImage === expectedImage;
      }
    });

    // console.log(encodeURIComponent(actualImage));

    expect(matchesAnImage).to.equal(true);
  }
});

// If we are on Windows, skip performance test items
if (process.platform === 'win32') {
  delete content["interpretting a ridiculous amount of images"];
  delete content["does not crash"];
  delete content["returns an image"];
}

// Export the content
module.exports = content;<commit_msg>Trying out outputting content again<commit_after>// Load in parts to make our content
var smith = require('../lib/gmsmith'),
    extend = require('obj-extend'),
    commonTest = require('spritesmith-engine-test').content;

// Duck punch over test items
var content = extend({}, commonTest, {
  'gmsmith': function () {
    this.smith = smith;
    smith.set({imagemagick: process.env.TEST_IMAGEMAGICK});

    var expectedDir = __dirname + '/expected_files/';
    this.expectedFilepaths = [
      expectedDir + '/multiple.png',
      expectedDir + '/multiple2.png',
      expectedDir + '/multiple3.png'
    ];
  },
  'can output an image':  function () {
    // Assert the actual image is the same expected
    var actualImage = this.result,
        matchesAnImage = false;

    // ANTI-PATTERN: Looping over set without identifiable lines for stack traces
    var fs = require('fs');
    var expect = require('chai').expect;
    this.expectedFilepaths.forEach(function testAgainstExpected (filepath) {
      if (!matchesAnImage) {
        var expectedImage = fs.readFileSync(filepath, 'binary');
        matchesAnImage = actualImage === expectedImage;
      }
    });

    console.log(encodeURIComponent(actualImage));

    expect(matchesAnImage).to.equal(true);
  }
});

// If we are on Windows, skip performance test items
if (process.platform === 'win32') {
  delete content["interpretting a ridiculous amount of images"];
  delete content["does not crash"];
  delete content["returns an image"];
}

// Export the content
module.exports = content;
{'fraction_non_alphanumeric': 0.12796362455342644, 'fraction_numerical': 0.0025982461838259174, 'mean_word_length': 3.4126074498567336, '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': '2107695', 'n_tokens_mistral': 890, 'n_tokens_neox': 868, 'n_words': 245}