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-2.1.0.53 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.52 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.51 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.50 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.49 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.48 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.47 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.46 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.45 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.44 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.43 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.42 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.41 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.40 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.39 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.38 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.37 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.36 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.34 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.1.0.33 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js