Sha256: b2d1898ed7d9a8cab490122026733b875d2330b2f64fc1acbe04ebdc93a83d1d

Contents?: true

Size: 1001 Bytes

Versions: 208

Compression:

Stored size: 1001 Bytes

Contents

import bracket from './bracket-push';

describe('bracket push', () => {
  it('checks for appropriate bracketing in a set of brackets', () => {
    expect(bracket('{}')).toEqual(true);
  });

  xit('returns false for unclosed brackets', () => {
    expect(bracket('{{')).toEqual(false);
  });

  xit('returns false if brackets are out of order', () => {
    expect(bracket('}{')).toEqual(false);
  });

  xit('checks bracketing in more than one pair of brackets', () => {
    expect(bracket('{}[]')).toEqual(true);
  });

  xit('checks bracketing in nested brackets', () => {
    expect(bracket('{[]}')).toEqual(true);
  });

  xit('rejects brackets that are properly balanced but improperly nested', () => {
    expect(bracket('{[}]')).toEqual(false);
  });

  xit('checks bracket closure with deeper nesting', () => {
    expect(bracket('{[)][]}')).toEqual(false);
  });

  xit('checks bracket closure in a long string of brackets', () => {
    expect(bracket('{[]([()])}')).toEqual(true);
  });
});

Version data entries

208 entries across 208 versions & 1 rubygems

Version Path
trackler-1.0.3.0 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-1.0.2.1 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-1.0.2.0 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-1.0.1.2 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-1.0.1.1 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-1.0.1.0 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-1.0.0.1 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-1.0.0 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js