From bdc8a38045f75da7b8491dfff854db8fe722ebf2 Mon Sep 17 00:00:00 2001 From: Daniel Hengeveld Date: Mon, 9 Nov 2015 16:15:55 +0100 Subject: [PATCH] add final buffer event spec --- spec/git-repository-async-spec.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/spec/git-repository-async-spec.js b/spec/git-repository-async-spec.js index a8c35b60a..e104be5e2 100644 --- a/spec/git-repository-async-spec.js +++ b/spec/git-repository-async-spec.js @@ -372,15 +372,16 @@ describe('GitRepositoryAsync-js', () => { expect(statusHandler.callCount).toBe(1) }) - // it('stops listening to the buffer when the repository is destroyed (regression)', () => { - // waitsForPromise(() => { - // atom.workspace.open('other.txt').then(o => editor = o) - // }) - // runs(() => { - // atom.project.getRepositories()[0].destroy() - // expect(-> editor.save()).not.toThrow() - // }) - // }) + it('stops listening to the buffer when the repository is destroyed (regression)', function () { + let editor + waitsForPromise(async function () { + editor = await atom.workspace.open('other.txt') + }) + runs(function () { + atom.project.getRepositories()[0].destroy() + expect(function () { editor.save() }).not.toThrow() + }) + }) }) })