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.58 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.57 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.56 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.55 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.54 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.53 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.52 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.51 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.50 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.49 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.48 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.47 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.46 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.45 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.44 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.43 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.42 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.41 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.40 tracks/javascript/exercises/octal/octal.spec.js
trackler-2.2.1.39 tracks/javascript/exercises/octal/octal.spec.js