Sha256: fd78c0fd8a2c5950eee32c36ebc4d31bd151da00b6d2f53b155975725f9ba19a

Contents?: true

Size: 1.1 KB

Versions: 141

Compression:

Stored size: 1.1 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

141 entries across 141 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.138 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.137 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.136 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.135 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.134 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.133 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.132 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.131 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.130 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.129 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.128 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.127 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.126 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.125 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.124 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.123 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.122 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.121 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.120 tracks/javascript/exercises/octal/octal.spec.js