mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 21:33:06 +07:00
26 lines
704 B
JavaScript
26 lines
704 B
JavaScript
|
var buildkite = require('../../lib/services/buildkite')
|
||
|
|
||
|
describe('Buildkite CI Provider', function() {
|
||
|
it('can detect buildkite', function() {
|
||
|
process.env.BUILDKITE = 'true'
|
||
|
expect(buildkite.detect()).toBe(true)
|
||
|
})
|
||
|
|
||
|
it('can get buildkite env info', function() {
|
||
|
process.env.BUILDKITE_BUILD_NUMBER = '1'
|
||
|
process.env.BUILDKITE_BUILD_URL = 'url'
|
||
|
process.env.BUILDKITE_COMMIT = 'commit'
|
||
|
process.env.BUILDKITE_BRANCH = 'branch'
|
||
|
process.env.BUILDKITE_PROJECT_SLUG = 'slug'
|
||
|
|
||
|
expect(buildkite.configuration()).toEqual({
|
||
|
service: 'buildkite',
|
||
|
build: '1',
|
||
|
build_url: 'url',
|
||
|
commit: 'commit',
|
||
|
branch: 'branch',
|
||
|
slug: 'slug',
|
||
|
})
|
||
|
})
|
||
|
})
|