<commit_before>describe "bracket matching", ->
  [editorElement, editor, buffer, gutter] = []

  beforeEach ->
    atom.config.set 'bracket-matcher.autocompleteBrackets', true

    waitsForPromise ->
      atom.packages.activatePackage('bracket-matcher')

    waitsForPromise ->
      atom.packages.activatePackage('language-javascript')

    waitsForPromise ->
      atom.packages.activatePackage('language-xml')

    waitsForPromise ->
      atom.workspace.open('sample.js')

    runs ->
      editor = atom.workspace.getActiveTextEditor()
      editorElement = atom.views.getView(editor)
      buffer = editor.getBuffer()
      gutter = editor.gutterWithName('line-number')

  describe "matching bracket highlighting", ->
    expectNoHighlights = ->
      decorations = editor.getHighlightDecorations().filter (decoration) -> decoration.properties.class is 'bracket-matcher'
      expect(decorations.length).toBe 0

    expectHighlights = (startBufferPosition, endBufferPosition) ->
      decorations = editor.getHighlightDecorations().filter (decoration) -> decoration.properties.class is 'bracket-matcher'
      gutterDecorations = editor.getLineNumberDecorations().filter (gutterDecoration) -> gutterDecoration.properties.class is 'bracket-matcher'

      expect(decorations.length).toBe 2
      expect(gutterDecorations.length).toBe 2

      expect(decorations[0].marker.getStartBufferPosition()).toEqual startBufferPosition
      expect(decorations[1].marker.getStartBufferPosition()).toEqual endBufferPosition<commit_msg>Fix tests: set bracket-matcher.highlightMatchingLineNumber to true<commit_after>describe "bracket matching", ->
  [editorElement, editor, buffer, gutter] = []

  beforeEach ->
    atom.config.set 'bracket-matcher.autocompleteBrackets', true

    waitsForPromise ->
      atom.packages.activatePackage('bracket-matcher')

    waitsForPromise ->
      atom.packages.activatePackage('language-javascript')

    waitsForPromise ->
      atom.packages.activatePackage('language-xml')

    waitsForPromise ->
      atom.workspace.open('sample.js')

    runs ->
      editor = atom.workspace.getActiveTextEditor()
      editorElement = atom.views.getView(editor)
      buffer = editor.getBuffer()
      gutter = editor.gutterWithName('line-number')

  describe "matching bracket highlighting", ->
    beforeEach ->
      atom.config.set 'bracket-matcher.highlightMatchingLineNumber', true

    expectNoHighlights = ->
      decorations = editor.getHighlightDecorations().filter (decoration) -> decoration.properties.class is 'bracket-matcher'
      expect(decorations.length).toBe 0

    expectHighlights = (startBufferPosition, endBufferPosition) ->
      decorations = editor.getHighlightDecorations().filter (decoration) -> decoration.properties.class is 'bracket-matcher'
      gutterDecorations = editor.getLineNumberDecorations().filter (gutterDecoration) -> gutterDecoration.properties.class is 'bracket-matcher'

      expect(decorations.length).toBe 2
      expect(gutterDecorations.length).toBe 2

      expect(decorations[0].marker.getStartBufferPosition()).toEqual startBufferPosition
      expect(decorations[1].marker.getStartBufferPosition()).toEqual endBufferPosition
{'fraction_non_alphanumeric': 0.10979413599500935, 'fraction_numerical': 0.0031191515907673115, 'mean_word_length': 4.19773095623987, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1861333', 'n_tokens_mistral': 908, 'n_tokens_neox': 846, 'n_words': 136}