Don't use workspace's itemLocationStore in tests

This commit is contained in:
Max Brunsfeld
2017-04-07 15:30:44 -07:00
parent daa449e8d5
commit 48336fb95e
3 changed files with 14 additions and 4 deletions

View File

@@ -294,6 +294,15 @@ describe('Workspace', () => {
})
describe('when the active pane does not have an editor for the given uri', () => {
beforeEach(() => {
atom.workspace.enablePersistence = true
})
afterEach(async () => {
await atom.workspace.itemLocationStore.clear()
atom.workspace.enablePersistence = false
})
it('adds and activates a new editor for the given path on the active pane', () => {
let editor = null
waitsForPromise(() => workspace.open('a').then(o => { editor = o }))