Sha256: 58c2c2360644fa4944f5d30a6bff5d557b5e2faea05e70d80a747757bcbf2dd5

Contents?: true

Size: 997 Bytes

Versions: 255

Compression:

Stored size: 997 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

255 entries across 255 versions & 1 rubygems

Version Path
trackler-2.2.1.37 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.36 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.35 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.34 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.33 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.32 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.31 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.30 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.29 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.28 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.27 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.26 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.25 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.24 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.23 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.22 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.21 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.20 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.19 tracks/javascript/exercises/trinary/trinary.spec.js
trackler-2.2.1.18 tracks/javascript/exercises/trinary/trinary.spec.js