un-nest waitsForPromise

This commit is contained in:
Daniel Hengeveld
2015-10-20 16:42:20 +02:00
parent 057f0817e3
commit 95b3ac806f

View File

@@ -182,13 +182,13 @@ describe "GitRepositoryAsync", ->
# fail if it was rejected..
waitsForPromise ->
repo.checkoutHead(filePath)
runs ->
onSuccess = jasmine.createSpy('onSuccess')
waitsForPromise ->
repo.isPathModified(filePath).then(onSuccess)
runs ->
expect(onSuccess.mostRecentCall.args[0]).toBeFalsy()
waitsForPromise ->
repo.isPathModified(filePath).then(onSuccess)
runs ->
expect(onSuccess.mostRecentCall.args[0]).toBeFalsy()
it "restores the contents of the path to the original text", ->
fs.writeFileSync(filePath, 'ch ch changes')