Sha256: b9552089561ac2decff4c0d0bd220cb42337644abde159dbb60d4de2ed4e0136

Contents?: true

Size: 729 Bytes

Versions: 118

Compression:

Stored size: 729 Bytes

Contents

var Diamond = require('./diamond');

describe('Diamond', function () {
  var diamond = new Diamond();

  it('test letter A', function () {
    var result = 'A\n';
    expect(diamond.makeDiamond('A')).toEqual(result);
  });

  it('test letter C', function () {
    var result = ['  A  ',
      ' B B ',
      'C   C',
      ' B B ',
      '  A  '].join('\n') + '\n';
    expect(diamond.makeDiamond('C')).toEqual(result);
  });

  it('test letter E', function () {
    var result = ['    A    ',
      '   B B   ',
      '  C   C  ',
      ' D     D ',
      'E       E',
      ' D     D ',
      '  C   C  ',
      '   B B   ',
      '    A    '].join('\n') + '\n';
    expect(diamond.makeDiamond('E')).toEqual(result);
  });
});

Version data entries

118 entries across 118 versions & 1 rubygems

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