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.98 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.97 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.96 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.95 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.94 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.93 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.92 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.91 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.90 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.89 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.88 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.87 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.86 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.85 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.84 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.83 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.82 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.81 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.80 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.79 tracks/javascript/exercises/prime-factors/prime-factors.spec.js