<commit_before>'use strict';

var fs      = require('fs');
var utility = require('../utility');

describe('sub-languages', function() {
  before(function() {
    this.block = document.querySelector('#sublanguages');
  });

  it('should highlight XML with PHP and JavaScript', function() {
    var filename = utility.buildPath('expect', 'sublanguages.txt'),

        expected = fs.readFileSync(filename, 'utf-8'),
        actual   = this.block.innerHTML;

    actual.should.equal(expected);
  });
});<commit_msg>Change sub languages to asynchronous testing<commit_after>'use strict';

var fs      = require('fs');
var utility = require('../utility');

describe('sub-languages', function() {
  before(function() {
    this.block = document.querySelector('#sublanguages');
  });

  it('should highlight XML with PHP and JavaScript', function(done) {
    var filename = utility.buildPath('expect', 'sublanguages.txt'),
        actual   = this.block.innerHTML;

    fs.readFile(filename, 'utf-8',
                utility.handleExpectedFile(actual, done));
  });
});
{'fraction_non_alphanumeric': 0.1632075471698113, 'fraction_numerical': 0.0018867924528301887, 'mean_word_length': 3.8447488584474887, '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': '3194325', 'n_tokens_mistral': 305, 'n_tokens_neox': 297, 'n_words': 67}