File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -743,16 +743,23 @@ describe 'FuzzyFinder', ->
743
743
expect (secondaryMatches .last ().text ()).toBe ' js'
744
744
745
745
it " highlights matches in the directory and file name" , ->
746
+ spyOn (bufferView, ' setItems' ).andReturn [
747
+ {
748
+ filePath : ' /test/root-dir1/sample.js'
749
+ projectRelativePath : ' root-dir1/sample.js'
750
+ }
751
+ ]
752
+
746
753
bufferView .filterEditorView .getModel ().setText (' root-dirsample' )
747
754
bufferView .populateList ()
748
755
resultView = bufferView .getSelectedItemView ()
749
756
750
757
primaryMatches = resultView .find (' .primary-line .character-match' )
751
- secondaryMatches = resultView .find (' .secondary-line .character-match' )
752
758
expect (primaryMatches .length ).toBe 1
753
759
expect (primaryMatches .last ().text ()).toBe ' sample'
754
- # Use `toBeGreaterThan` because dir may have some characters in it
755
- expect (secondaryMatches .length ).toBeGreaterThan 1
760
+
761
+ secondaryMatches = resultView .find (' .secondary-line .character-match' )
762
+ expect (secondaryMatches .length ).toBe 2
756
763
expect (secondaryMatches .first ().text ()).toBe ' root-dir'
757
764
expect (secondaryMatches .last ().text ()).toBe ' sample'
758
765
You can’t perform that action at this time.
0 commit comments