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.119 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.118 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.117 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.116 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.115 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.114 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js
trackler-2.2.1.113 tracks/javascript/exercises/armstrong-numbers/armstrong-numbers.spec.js