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.0.8.28 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.27 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.26 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.24 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.23 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.22 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.21 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.20 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.19 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.18 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.17 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.16 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.15 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.14 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.13 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.12 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.11 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.10 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.9 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js
trackler-2.0.8.8 tracks/ecmascript/exercises/bracket-push/bracket-push.spec.js