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.58 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.57 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.56 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.55 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.54 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.53 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.52 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.51 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.50 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.49 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.48 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.47 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.46 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.45 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.44 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.43 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.42 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.41 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.40 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.39 tracks/javascript/exercises/prime-factors/prime-factors.spec.js