Sha256: 60f7c3b95d81596922f0f8011b625256fcef3e2142b2d808b9884ed4cccfaa65

Contents?: true

Size: 1004 Bytes

Versions: 141

Compression:

Stored size: 1004 Bytes

Contents

var Trinary = require('./trinary');

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

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

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

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

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

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

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

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

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

Version data entries

141 entries across 141 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.97 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.96 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.95 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.94 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.93 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.92 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.91 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.90 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.89 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.88 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.87 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.86 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.85 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.84 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.83 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.82 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.81 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.80 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.79 tracks/javascript/exercises/trinary/trinary.spec.js