Sha256: 67d00c64bbad0f53a3ea04c799025c889b0b8212aefdc7e8b35c8798b1a1d10f

Contents?: true

Size: 1.09 KB

Versions: 255

Compression:

Stored size: 1.09 KB

Contents

var Octal = require('./octal');

describe('octal', function() {

  it('1 is decimal 1', function() {
    expect(new Octal('1').toDecimal()).toEqual(1);
  });

  xit('10 is decimal 8', function() {
    expect(new Octal('10').toDecimal()).toEqual(8);
  });

  xit('17 is decimal 15', function() {
    expect(new Octal('17').toDecimal()).toEqual(15);
  });

  xit('11 is decimal 9', function() {
    expect(new Octal('11').toDecimal()).toEqual(9);
  });

  xit('130 is decimal 88', function() {
    expect(new Octal('130').toDecimal()).toEqual(88);
  });

  xit('2047 is decimal 1063', function() {
    expect(new Octal('2047').toDecimal()).toEqual(1063);
  });

  xit('7777 is decimal 4095', function() {
    expect(new Octal('7777').toDecimal()).toEqual(4095);
  });

  xit('1234567 is decimal 342391', function() {
    expect(new Octal('1234567').toDecimal()).toEqual(342391);
  });

  xit('invalid is decimal 0', function() {
    expect(new Octal('carrot').toDecimal()).toEqual(0);
  });

  xit('considers the digit 8 as invalid', function() {
    expect(new Octal('12345678').toDecimal()).toEqual(0);
  });

});

Version data entries

255 entries across 255 versions & 1 rubygems

Version Path
trackler-2.0.0.4 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.0.0.3 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.0.0.2 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.0.0.1 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.0.0.0 tracks/javascript/exercises/octal/octal.spec.js
trackler-1.0.4.1 tracks/javascript/exercises/octal/octal.spec.js
trackler-1.0.4.0 tracks/javascript/exercises/octal/octal.spec.js
trackler-1.0.3.0 tracks/javascript/exercises/octal/octal.spec.js
trackler-1.0.2.1 tracks/javascript/exercises/octal/octal.spec.js
trackler-1.0.2.0 tracks/javascript/exercises/octal/octal.spec.js
trackler-1.0.1.2 tracks/javascript/exercises/octal/octal.spec.js
trackler-1.0.1.1 tracks/javascript/exercises/octal/octal.spec.js
trackler-1.0.1.0 tracks/javascript/exercises/octal/octal.spec.js
trackler-1.0.0.1 tracks/javascript/exercises/octal/octal.spec.js
trackler-1.0.0 tracks/javascript/exercises/octal/octal.spec.js