Skip to content

Commit

Permalink
Merge 5596e0b into 5f5dabf
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhicks-bsf committed Sep 16, 2015
2 parents 5f5dabf + 5596e0b commit 11202ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/config_builder.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ module.exports =

switch
when k is 'tags'
"--#{k}=".concat(
(_(Array::concat(val[k]))
_(Array::concat(val[k]))
.map((tagPart) -> ['--tags', tagPart])
.flatten()
.value())
.join(", "))
.value()

when k is 'driver'
process.argv.push "--driver=#{val[k]}"
Expand Down
7 changes: 4 additions & 3 deletions src/support/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ module.exports = ->
@driver.visit = @driver.get

@After ->
terminateDriver() unless shouldPreventBrowserReload()
if @driver?
terminateDriver() unless shouldPreventBrowserReload()

@registerHandler "AfterFeatures", (event, callback) =>
if shouldPreventBrowserReload()
terminateDriver().then -> callback()
if shouldPreventBrowserReload() and @driver?
terminateDriver().then callback
else
callback()

Expand Down
2 changes: 1 addition & 1 deletion test/unit/config.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe "Pioneer configuration", ->

it "should convertToExecOptions with multiple tags", ->
configBuilder.convertToExecOptions(this.multiTagConfig, this.libPath)
.should.eql([null, null, "--require", "wow/support", "--tags=@wow, @doge"])
.should.eql([null, null, "--require", "wow/support", "--tags", "@wow", "--tags", "@doge"])
process.argv.should.eql([])

it "should push command line arguments for driver and reload", ->
Expand Down

0 comments on commit 11202ae

Please sign in to comment.