Sha256: 93e6b7deaa40bae7926d4b3f9df7a9ae95e28697397640b3451db2b355688f67

Contents?: true

Size: 1.52 KB

Versions: 68

Compression:

Stored size: 1.52 KB

Contents

var SecretHandshake = require('./secret-handshake');

describe('Secret Handshake', function () {
  it('1 is a wink', function () {
    var handshake = new SecretHandshake(1);
    expect(handshake.commands()).toEqual(['wink']);
  });

  xit('10 is a double blink', function () {
    var handshake = new SecretHandshake(2);
    expect(handshake.commands()).toEqual(['double blink']);
  });

  xit('100 is close your eyes', function () {
    var handshake = new SecretHandshake(4);
    expect(handshake.commands()).toEqual(['close your eyes']);
  });

  xit('1000 is jump', function () {
    var handshake = new SecretHandshake(8);
    expect(handshake.commands()).toEqual(['jump']);
  });

  xit('11 is wink and double blink', function () {
    var handshake = new SecretHandshake(3);
    expect(handshake.commands()).toEqual(['wink', 'double blink']);
  });

  xit('10011 is double blink and wink', function () {
    var handshake = new SecretHandshake(19);
    expect(handshake.commands()).toEqual(['double blink', 'wink']);
  });

  xit('11111 is jump, close your eyes, double blink, and wink', function () {
    var handshake = new SecretHandshake(31);
    expect(handshake.commands()).toEqual(['jump', 'close your eyes', 'double blink', 'wink']);
  });

  xit('text is an invalid secret handshake', function () {
    expect( function () {
      /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "[iI]gnored" }]*/
      var ignoredHandshake = new SecretHandshake('piggies');
    }).toThrow(new Error('Handshake must be a number'));
  });
});

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.158 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.157 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.156 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.155 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.154 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.153 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.152 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.151 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.150 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.149 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.148 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.147 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.146 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.145 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.144 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.143 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.142 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.141 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js
trackler-2.2.1.140 tracks/javascript/exercises/secret-handshake/secret-handshake.spec.js