<commit_before>var compute = require('./hamming').compute;

describe('Hamming', function () {

  it('no difference between identical strands', function () {
    expect(compute('A', 'A')).toEqual(0);
  });

  xit('complete hamming distance for single nucleotide strand', function () {
    expect(compute('A','G')).toEqual(1);
  });

  xit('complete hamming distance for small strand', function () {
    expect(compute('AG','CT')).toEqual(2);
  });

  xit('small hamming distance', function () {
    expect(compute('AT','CT')).toEqual(1);
  });

  xit('small hamming distance in longer strand', function () {
    expect(compute('GGACG', 'GGTCG')).toEqual(1);
  });

  xit('ignores extra length on first strand when longer', function () {
    expect(compute('AAAG', 'AAA')).toEqual(0);
  });

  xit('ignores extra length on other strand when longer', function () {
    expect(compute('AAA', 'AAAG')).toEqual(0);
  });

  xit('large hamming distance', function () {
    expect(compute('GATACA', 'GCATAA')).toEqual(4);
  });

  xit('hamming distance in very long strand', function () {
    expect(compute('GGACGGATTCTG', 'AGGACGGATTCT')).toEqual(9);
  });

});<commit_msg>Fix tests with different length strings to look for undefined result, rather than zero.<commit_after>var compute = require('./hamming').compute;

describe('Hamming', function () {

  it('no difference between identical strands', function () {
    expect(compute('A', 'A')).toEqual(0);
  });

  xit('complete hamming distance for single nucleotide strand', function () {
    expect(compute('A','G')).toEqual(1);
  });

  xit('complete hamming distance for small strand', function () {
    expect(compute('AG','CT')).toEqual(2);
  });

  xit('small hamming distance', function () {
    expect(compute('AT','CT')).toEqual(1);
  });

  xit('small hamming distance in longer strand', function () {
    expect(compute('GGACG', 'GGTCG')).toEqual(1);
  });

  xit('no defined hamming distance for unequal string (first way)', function () {
    expect(compute('AAAG', 'AAA')).toBeUndefined();
  });

  xit('no defined hamming distance for unequal string (second way)', function () {
    expect(compute('AAA', 'AAAG')).toBeUndefined();
  });

  xit('large hamming distance', function () {
    expect(compute('GATACA', 'GCATAA')).toEqual(4);
  });

  xit('hamming distance in very long strand', function () {
    expect(compute('GGACGGATTCTG', 'AGGACGGATTCT')).toEqual(9);
  });

});
{'fraction_non_alphanumeric': 0.1902419024190242, 'fraction_numerical': 0.006560065600656006, 'mean_word_length': 4.687645687645688, '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': '5910222', 'n_tokens_mistral': 765, 'n_tokens_neox': 732, 'n_words': 177}