@@ -3169,7 +3169,7 @@ describe "TreeView", ->
3169
3169
3170
3170
finishRemovalSpy = spyOn (treeView, ' finishRemoval' ).andCallThrough ()
3171
3171
3172
- removeSelectedPathsPermanentlySpy = spyOnAsyncAndCallThrough (treeView, ' removeSelectedPathsPermanently' )
3172
+ removeSelectedPathsPermanentlySpy = spyOn (treeView, ' removeSelectedPathsPermanently' ). andCallThrough ( )
3173
3173
removeSelectedEntriesSpy = spyOn (treeView, ' removeSelectedEntries' ).andCallThrough ()
3174
3174
3175
3175
filePath = path .join (os .tmpdir (), ' non-project-file.txt' )
@@ -3181,26 +3181,23 @@ describe "TreeView", ->
3181
3181
waitsForPromise ->
3182
3182
atom .commands .dispatch (treeView .element , ' tree-view:remove-permanently' )
3183
3183
3184
- waitsFor ->
3185
- removeSelectedPathsPermanentlySpy .calledWith isnt undefined
3186
-
3187
3184
waitsFor ' removeSelectedEntries amd removeSelectedPathsPermanently to be called' , ->
3188
3185
removeSelectedEntriesSpy .callCount is 1 and
3189
3186
removeSelectedEntriesSpy .mostRecentCall .args [0 ] is true and
3190
- removeSelectedPathsPermanentlySpy .calledWith [0 ] is [ filePath]
3187
+ removeSelectedPathsPermanentlySpy .mostRecentCall . args [0 ][ 0 ] is filePath
3191
3188
3192
3189
# The internal functionality of the followings are already tested in treeview:remove
3193
3190
waitsFor ' it calls onWillDeleteEntry' , ->
3194
3191
onWillDeleteEntrySpy .callCount is 1 and
3195
- onWillDeleteEntrySpy .mostRecentCall .args [0 ] is { pathToDelete : filePath}
3192
+ onWillDeleteEntrySpy .mostRecentCall .args [0 ]. pathToDelete is filePath
3196
3193
3197
3194
waitsFor ' it calls onEntryDeleted' , ->
3198
3195
onEntryDeletedSpy .callCount is 1 and
3199
- onEntryDeletedSpy .mostRecentCall .args [0 ] is { pathToDelete : filePath}
3196
+ onEntryDeletedSpy .mostRecentCall .args [0 ]. pathToDelete is filePath
3200
3197
3201
3198
waitsFor ' it calls finishRemoval' , ->
3202
3199
finishRemovalSpy .callCount is 1 and
3203
- finishRemovalSpy .mostRecentCall .args [0 ] is removeSelectedPathsPermanentlySpy .calledWith [1 ][0 ]
3200
+ finishRemovalSpy .mostRecentCall .args [0 ] is removeSelectedPathsPermanentlySpy .mostRecentCall . args [1 ][0 ]
3204
3201
3205
3202
describe " file system events" , ->
3206
3203
temporaryFilePath = null
0 commit comments