mirror of
https://github.com/atom/atom.git
synced 2026-02-07 21:25:05 -05:00
Fix fuzzy specs
This commit is contained in:
@@ -18,7 +18,7 @@ class LoadPathsTask
|
||||
args = ['-l', rootPath]
|
||||
args.unshift("--addVCSIgnores") if config.get('nak.addVCSIgnores')
|
||||
args.unshift("-d", "#{ignoredNames.join(',')}") if ignoredNames.length > 0
|
||||
|
||||
|
||||
paths = []
|
||||
deferred = $.Deferred()
|
||||
exit = (code) =>
|
||||
@@ -28,7 +28,7 @@ class LoadPathsTask
|
||||
@callback(paths)
|
||||
deferred.resolve()
|
||||
stdout = (data) ->
|
||||
paths = paths.concat(data.split("\n"))
|
||||
paths = paths.concat(_.compact(data.split("\n")))
|
||||
|
||||
new BufferedProcess({command, args, stdout, exit})
|
||||
deferred
|
||||
|
||||
@@ -365,7 +365,7 @@ describe 'FuzzyFinder', ->
|
||||
expect(finderView).toBeVisible()
|
||||
expect(rootView.find('.fuzzy-finder input:focus')).toExist()
|
||||
|
||||
it "opens a file directly when there is a single match", ->
|
||||
fit "opens a file directly when there is a single match", ->
|
||||
editor.setText("sample.txt")
|
||||
jasmine.unspy(window, "setTimeout")
|
||||
rootView.trigger 'fuzzy-finder:find-under-cursor'
|
||||
@@ -379,7 +379,7 @@ describe 'FuzzyFinder', ->
|
||||
|
||||
runs ->
|
||||
expect(finderView).not.toBeVisible()
|
||||
expect(openedPath).toBe "sample.txt"
|
||||
expect(openedPath).toBe "#{project.getPath()}/sample.txt"
|
||||
|
||||
it "displays an error when the word under the cursor doesn't match any files", ->
|
||||
editor.setText("moogoogaipan")
|
||||
|
||||
Reference in New Issue
Block a user