Sha256: bc1092904fbc15db7b6c8c9645ee89845a2c288def50d6533ff378b058acf925

Contents?: true

Size: 1.12 KB

Versions: 141

Compression:

Stored size: 1.12 KB

Contents

var primeFactors = require('./prime-factors');

describe('primeFactors', function () {
  it('returns an empty array for 1', function () {
    expect(primeFactors.for(1)).toEqual([]);
  });

  xit('factors 2', function () {
    expect(primeFactors.for(2)).toEqual([2]);
  });

  xit('factors 3', function () {
    expect(primeFactors.for(3)).toEqual([3]);
  });

  xit('factors 4', function () {
    expect(primeFactors.for(4)).toEqual([2, 2]);
  });

  xit('factors 6', function () {
    expect(primeFactors.for(6)).toEqual([2, 3]);
  });

  xit('factors 8', function () {
    expect(primeFactors.for(8)).toEqual([2, 2, 2]);
  });

  xit('factors 9', function () {
    expect(primeFactors.for(9)).toEqual([3, 3]);
  });

  xit('factors 27', function () {
    expect(primeFactors.for(27)).toEqual([3, 3, 3]);
  });

  xit('factors 625', function () {
    expect(primeFactors.for(625)).toEqual([5, 5, 5, 5]);
  });

  xit('factors 901255', function () {
    expect(primeFactors.for(901255)).toEqual([5, 17, 23, 461]);
  });

  xit('factors 93819012551', function () {
    expect(primeFactors.for(93819012551)).toEqual([11, 9539, 894119]);
  });
});

Version data entries

141 entries across 141 versions & 1 rubygems

Version Path
trackler-2.2.1.78 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.77 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.76 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.75 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.74 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.73 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.72 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.71 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.70 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.69 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.68 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.67 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.66 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.65 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.64 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.63 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.62 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.61 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.60 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.59 tracks/javascript/exercises/prime-factors/prime-factors.spec.js