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.119 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.118 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.117 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.116 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.115 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.114 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.113 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.111 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.110 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.109 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.108 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.107 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.106 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.105 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.104 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.103 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.102 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.101 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.100 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.99 tracks/javascript/exercises/octal/octal.spec.js