<commit_before>'use strict';
var Palindromes = require('./palindrome-products');

describe('Palindrome', function() {

  it('largest palindrome from single digit factors', function() {
    var palindromes = new Palindromes({maxFactor: 9});
    palindromes.generate();

    var largest = palindromes.largest();
    expect(largest.value).toEqual(9);
    expect([[[3, 3], [1, 9]], [[1, 9], [3, 3]]]).toContain(largest.factors);
  });

  xit('largets palindrome from double digit factors', function() {
    var palindromes = new Palindromes({ maxFactor: 99, minFactor: 10 });
    palindromes.generate();

    var largest = palindromes.largest();
    expect(largest.value).toEqual(9009);
    expect(largest.factors).toEqual([[91, 99]]);
  });

  xit('smallest palindrome from double digit factors', function() {
    var palindromes = new Palindromes({ maxFactor: 99, minFactor: 10 });
    palindromes.generate();

    var smallest = palindromes.smallest();
    expect(smallest.value).toEqual(121);
    expect(smallest.factors).toEqual([[11, 11]]);<commit_msg>palindrome-products: fix ordering of actual/expected<commit_after>'use strict';
var Palindromes = require('./palindrome-products');

describe('Palindrome', function() {

  it('largest palindrome from single digit factors', function() {
    var palindromes = new Palindromes({maxFactor: 9});
    palindromes.generate();

    var largest = palindromes.largest();
    expect(largest.value).toEqual(9);
    var orderedLargestFactors = largest.factors.sort(
      function(a, b) { return a[0] > b[0]; }
    );
    expect(orderedLargestFactors).toEqual([[1, 9], [3, 3]]);
  });

  xit('largets palindrome from double digit factors', function() {
    var palindromes = new Palindromes({ maxFactor: 99, minFactor: 10 });
    palindromes.generate();

    var largest = palindromes.largest();
    expect(largest.value).toEqual(9009);
    expect(largest.factors).toEqual([[91, 99]]);
  });

  xit('smallest palindrome from double digit factors', function() {
    var palindromes = new Palindromes({ maxFactor: 99, minFactor: 10 });
    palindromes.generate();

    var smallest = palindromes.smallest();
    expect(smallest.value).toEqual(121);
    expect(smallest.factors).toEqual([[11, 11]]);
{'fraction_non_alphanumeric': 0.1586946803755029, 'fraction_numerical': 0.028609745194456863, 'mean_word_length': 4.498771498771498, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '674645', 'n_tokens_mistral': 781, 'n_tokens_neox': 684, 'n_words': 159}