Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Commit

Permalink
fix: set buildkite, not appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Oct 23, 2017
1 parent 15556d8 commit edafa0a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
10 changes: 8 additions & 2 deletions lib/bumpercar.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@ module.exports = {
providers.appVeyor = appVeyorProvider.configure(configProviders.appVeyor)

if configProviders.buildkite?
providers.appVeyor = buildkiteProvider.configure(configProviders.buildkite)
providers.buildkite = buildkiteProvider.configure(configProviders.buildkite)

findProviderOrDie = (providerName) ->
providers[providerName] or throw new Error("Provider wasn't configured: '#{providerName}'")
if not providers[providerName]
msg = """
Provider wasn't configured: '#{providerName}'
Available providers: #{Object.keys(providers)}
"""
throw new Error(msg)
providers[providerName]

return {
_providers: providers
Expand Down
12 changes: 10 additions & 2 deletions test/bumpercar_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ describe "Bumpercar", ->
.then -> throw new Error("Should have thrown!")

.catch (error) ->
expect(error.message).to.equal "Provider wasn't configured: 'circle'"
expected = """
Provider wasn't configured: 'circle'
Available providers: travis
"""
expect(error.message).to.equal(expected)

describe "#runProject", ->
it "calls through to travis", ->
Expand All @@ -93,4 +97,8 @@ describe "Bumpercar", ->
.then -> throw new Error("Should have thrown!")

.catch (error) ->
expect(error.message).to.equal "Provider wasn't configured: 'circle'"
expected = """
Provider wasn't configured: 'circle'
Available providers: travis
"""
expect(error.message).to.equal(expected)

0 comments on commit edafa0a

Please sign in to comment.