Optionally throw an error when attempting to open a non-existent dir

This commit is contained in:
Ash Wilson
2017-09-18 10:32:47 -04:00
parent 2e57312380
commit 156cd02953
2 changed files with 17 additions and 2 deletions

View File

@@ -498,6 +498,11 @@ describe "Project", ->
atom.project.addPath('/this-definitely/does-not-exist')
expect(atom.project.getPaths()).toEqual(previousPaths)
it "optionally throws on non-existent directories", ->
expect ->
atom.project.addPath '/this-definitely/does-not-exist', mustExist: true
.toThrow()
describe ".removePath(path)", ->
onDidChangePathsSpy = null