mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Support setting working directory of child process
This commit is contained in:
@@ -127,3 +127,18 @@ describe 'Child Processes', ->
|
||||
|
||||
runs ->
|
||||
expect(output.length).toBeGreaterThan 1
|
||||
|
||||
describe "when the cwd option is set", ->
|
||||
it "runs the task from the specified current working directory", ->
|
||||
output = []
|
||||
|
||||
waitsForPromise ->
|
||||
options =
|
||||
cwd: fixturesProject.getPath()
|
||||
stdout: (data) -> output.push(data)
|
||||
stderr: (data) ->
|
||||
|
||||
ChildProcess.exec("pwd", options)
|
||||
|
||||
runs ->
|
||||
expect(output.join('')).toBe "#{fixturesProject.getPath()}\n"
|
||||
|
||||
Reference in New Issue
Block a user