Sha256: 31fce74849069f8dd18f7bffa537d4c53a086bcd2f7a8a1f56766c6a90c3afe2

Contents?: true

Size: 1.22 KB

Versions: 133

Compression:

Stored size: 1.22 KB

Contents

var dna = require('./nucleotide-count');

describe('DNA', function () {
  it('Empty DNA strand has no adenosine', function () {
    expect(dna().count('A')).toEqual(0);
  });

  xit('Repetitive cytidine gets counted', function () {
    expect(dna('CCCCC').count('C')).toEqual(5);
  });

  xit('Counts only thymidine', function () {
    expect(dna('GGGGGTAACCCGG').count('T')).toEqual(1);
  });

  xit('Counts a nucleotide only once', function () {
    var acid = dna('CGATTGGG');
    acid.count('T');
    acid.count('T');
    expect(acid.count('T')).toEqual(2);
  });

  xit('Empty DNA strand has no nucleotides', function () {
    var expected = {A: 0, T: 0, C: 0, G: 0};
    expect(dna().histogram()).toEqual(expected);
  });

  xit('Repetitive sequence has only guanosine', function () {
    var expected = {A: 0, T: 0, C: 0, G: 8};
    expect(dna('GGGGGGGG').histogram()).toEqual(expected);
  });

  xit('Counts all nucleotides', function () {
    var strand = 'AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC';
    var expected = {A: 20, T: 21, C: 12, G: 17};
    expect(dna(strand).histogram()).toEqual(expected);
  });

  xit('Validates DNA', function () {
    expect(dna.bind(null, 'JOHNNYAPPLESEED')).toThrow();
  });
});

Version data entries

133 entries across 133 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.138 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.137 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.136 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.135 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.134 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.133 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.132 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.131 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.130 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.129 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.128 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.127 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.126 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.125 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.124 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.123 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.122 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.121 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js
trackler-2.2.1.120 tracks/javascript/exercises/nucleotide-count/nucleotide-count.spec.js