setup-php/node_modules/codecov/test/services/buildkite.test.js
2019-09-20 21:54:46 +05:30

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',
})
})
})