Sha256: 603f3d8fdb241666e06c10157279b6cfc06a30d63ad4571b09ea0bd60b8b5c40

Contents?: true

Size: 1.03 KB

Versions: 208

Compression:

Stored size: 1.03 KB

Contents

import Octal from './octal';

describe('octal', () => {

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

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

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

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

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

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

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

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

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

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

});

Version data entries

208 entries across 208 versions & 1 rubygems

Version Path
trackler-2.1.0.53 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.52 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.51 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.50 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.49 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.48 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.47 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.46 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.45 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.44 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.43 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.42 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.41 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.40 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.39 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.38 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.37 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.36 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.34 tracks/ecmascript/exercises/octal/octal.spec.js
trackler-2.1.0.33 tracks/ecmascript/exercises/octal/octal.spec.js