Sha256: 7959f6abcda81bab948a8aa90f065f3aa8e03e9ec7e5adf986ce25d4c82d27b9

Contents?: true

Size: 1.31 KB

Versions: 67

Compression:

Stored size: 1.31 KB

Contents

var ArmstrongNumber = require('./armstrong-numbers');

describe('ArmstrongNumber', function () {
  it('Single digit numbers are Armstrong numbers', function () {
    var input = 5;
    expect(ArmstrongNumber.validate(input)).toBe(true);
  });

  xit('There are no 2 digit Armstrong numbers', function () {
    var input = 10;
    expect(ArmstrongNumber.validate(input)).toBe(false);
  });

  xit('Three digit number that is an Armstrong number', function () {
    var input = 153;
    expect(ArmstrongNumber.validate(input)).toBe(true);
  });

  xit('Three digit number that is not an Armstrong number', function () {
    var input = 100;
    expect(ArmstrongNumber.validate(input)).toBe(false);
  });

  xit('Four digit number that is an Armstrong number', function () {
    var input = 9474;
    expect(ArmstrongNumber.validate(input)).toBe(true);
  });

  xit('Four digit number that is not an Armstrong number', function () {
    var input = 9475;
    expect(ArmstrongNumber.validate(input)).toBe(false);
  });

  xit('Seven digit number that is an Armstrong number', function () {
    var input = 9926315;
    expect(ArmstrongNumber.validate(input)).toBe(true);
  });

  xit('Seven digit number that is not an Armstrong number', function () {
    var input = 9926314;
    expect(ArmstrongNumber.validate(input)).toBe(false);
  });
});

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.179 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.178 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.177 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.176 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.175 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.174 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.173 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.172 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.171 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.170 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.169 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.167 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.166 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.165 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.164 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.163 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.162 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.161 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.160 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js