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.159 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.158 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.157 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.156 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.155 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.154 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.153 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.152 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.151 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.150 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.149 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.148 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.147 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.146 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.145 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.144 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.143 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.142 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.141 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.140 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js