From e867b68eab9b691f91cecb401f320cf811458c1d Mon Sep 17 00:00:00 2001 From: joshaber Date: Thu, 10 Dec 2015 10:38:15 -0500 Subject: [PATCH] Match the ordering of the GitRepository spec. --- spec/git-repository-async-spec.js | 52 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/spec/git-repository-async-spec.js b/spec/git-repository-async-spec.js index 1f8768593..9c49980f2 100644 --- a/spec/git-repository-async-spec.js +++ b/spec/git-repository-async-spec.js @@ -177,32 +177,6 @@ describe('GitRepositoryAsync', () => { }) }) - describe('.getPathStatus(path)', () => { - let filePath - - beforeEach(() => { - const workingDirectory = copyRepository() - repo = GitRepositoryAsync.open(workingDirectory) - filePath = path.join(workingDirectory, 'file.txt') - }) - - it('trigger a status-changed event when the new status differs from the last cached one', async () => { - const statusHandler = jasmine.createSpy('statusHandler') - repo.onDidChangeStatus(statusHandler) - fs.writeFileSync(filePath, '') - - await repo.getPathStatus(filePath) - - expect(statusHandler.callCount).toBe(1) - const status = Git.Status.STATUS.WT_MODIFIED - expect(statusHandler.argsForCall[0][0]).toEqual({path: filePath, pathStatus: status}) - fs.writeFileSync(filePath, 'abc') - - await repo.getPathStatus(filePath) - expect(statusHandler.callCount).toBe(1) - }) - }) - describe('.checkoutHeadForEditor(editor)', () => { let filePath let editor @@ -253,6 +227,32 @@ describe('GitRepositoryAsync', () => { }) }) + describe('.getPathStatus(path)', () => { + let filePath + + beforeEach(() => { + const workingDirectory = copyRepository() + repo = GitRepositoryAsync.open(workingDirectory) + filePath = path.join(workingDirectory, 'file.txt') + }) + + it('trigger a status-changed event when the new status differs from the last cached one', async () => { + const statusHandler = jasmine.createSpy('statusHandler') + repo.onDidChangeStatus(statusHandler) + fs.writeFileSync(filePath, '') + + await repo.getPathStatus(filePath) + + expect(statusHandler.callCount).toBe(1) + const status = Git.Status.STATUS.WT_MODIFIED + expect(statusHandler.argsForCall[0][0]).toEqual({path: filePath, pathStatus: status}) + fs.writeFileSync(filePath, 'abc') + + await repo.getPathStatus(filePath) + expect(statusHandler.callCount).toBe(1) + }) + }) + describe('.getDirectoryStatus(path)', () => { let directoryPath, filePath