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.119 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.118 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.117 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.116 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.115 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.114 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.113 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.111 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.110 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.109 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.108 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.107 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.106 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.105 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.104 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.103 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.102 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.101 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.100 tracks/javascript/exercises/prime-factors/prime-factors.spec.js
trackler-2.2.1.99 tracks/javascript/exercises/prime-factors/prime-factors.spec.js