{"size": 947, "ext": "js", "max_stars_repo_path": "test/support/example.js", "max_stars_repo_name": "tregusti/episode-parser", "max_stars_repo_stars_event_min_datetime": "2015-07-20T22:08:33.000Z", "max_stars_repo_stars_event_max_datetime": "2020-06-09T22:17:56.000Z", "max_issues_repo_path": "test/support/example.js", "max_issues_repo_name": "tregusti/episode-parser", "max_issues_repo_issues_event_min_datetime": "2015-10-12T05:09:47.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-24T21:00:58.000Z", "max_forks_repo_path": "test/support/example.js", "max_forks_repo_name": "tregusti/episode-parser", "max_forks_repo_forks_event_min_datetime": "2015-10-12T04:24:45.000Z", "max_forks_repo_forks_event_max_datetime": "2018-07-24T11:14:17.000Z"}
{"max_stars_count": 25, "max_issues_count": 15, "max_forks_count": 5, "avg_line_length": 26.3055555556, "max_line_length": 60, "alphanum_fraction": 0.6177402323}
'use strict'

var expect = require('chai').expect

function run(filename, details, context) {
  context('with filename like ' + filename, function() {
    var result
    beforeEach(function() {
      result = require('../..')(filename)
    })
    Object.keys(details).forEach(function(property) {
      var value = details[property]
      /* eslint curly:0 */
      if (value === undefined) {
        it('does not find the ' + property, function() {
          expect(result).to.not.have.a.property(property)
        })
      } else {
        it('finds the ' + property, function() {
          expect(result).to.have.a.property(property, value)
        })
      }
    })
  })
}

module.exports = function(filename, details) {
  run(filename, details, context)
}
module.exports.only = function(filename, details) {
  run(filename, details, context.only)
}
module.exports.skip = function(filename, details) {
  run(filename, details, context.skip)
}
