<commit_before>require 'coffee-script/register'
require './setup'

path = require('path')
glob = require('glob')
fs = require('fs')

groups = glob.sync("#{__dirname}/../specs/*")

toName = (dirname) ->
  path.basename(dirname).replace(/_/g, ' ').trim()

describe 'specs:', ->
  for group in groups
    describe toName(group), ->

      specs = glob.sync("#{group}/*")
      for spec in specs

        name = toName(spec)
        isPending = ~group.indexOf('pending')
        test = if isPending then xit else it

        test name, ((spec) ->
          ->
            data = fs.readFileSync(spec, 'utf-8')
            [meta, input, output] = data.split("\n----\n\n")

            result = js2coffee(input)
            expect(result).eql(output)
        )(spec)
<commit_msg>Allow for pending specs by adding .pending.<commit_after>require 'coffee-script/register'
require './setup'

path = require('path')
glob = require('glob')
fs = require('fs')

groups = glob.sync("#{__dirname}/../specs/*")

toName = (dirname) ->
  path.basename(dirname).replace(/_/g, ' ').trim()

describe 'specs:', ->
  for group in groups
    describe toName(group), ->

      specs = glob.sync("#{group}/*")
      for spec in specs

        name = toName(spec)
        isPending = ~group.indexOf('pending') or ~name.indexOf('pending')
        test = if isPending then xit else it

        test name, ((spec) ->
          ->
            data = fs.readFileSync(spec, 'utf-8')
            [meta, input, output] = data.split("\n----\n\n")

            result = js2coffee(input)
            expect(result).eql(output)
        )(spec)

{'fraction_non_alphanumeric': 0.17581047381546136, 'fraction_numerical': 0.0024937655860349127, 'mean_word_length': 2.3577405857740588, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6093326', 'n_tokens_mistral': 525, 'n_tokens_neox': 509, 'n_words': 118}