Sha256: 3a644c17e102718a43aece6605395eeba6761beadb1167dca9f3a3a53f26ec51

Contents?: true

Size: 1.03 KB

Versions: 208

Compression:

Stored size: 1.03 KB

Contents

import Trinary from './trinary';

describe('Trinary', () => {

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

  xit('2 is decimal 2', () => {
    expect(2).toEqual(new Trinary('2').toDecimal());
  });

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

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

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

  xit('112 is decimal 14', () => {
    expect(14).toEqual(new Trinary('112').toDecimal());
  });

  xit('222 is 26', () => {
    expect(26).toEqual(new Trinary('222').toDecimal());
  });

  xit('1122000120 is 32091', () => {
    expect(32091).toEqual(new Trinary('1122000120').toDecimal());
  });

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

  xit('digits from 3 to 9 are invalid', () => {
    expect(0).toEqual(new Trinary('123').toDecimal());
  });

});

Version data entries

208 entries across 208 versions & 1 rubygems

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