mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 21:33:06 +07:00
23 lines
616 B
JavaScript
23 lines
616 B
JavaScript
|
var teamcity = require('../../lib/services/teamcity')
|
||
|
|
||
|
describe('TeamCity CI Provider', function() {
|
||
|
it('can detect teamcity', function() {
|
||
|
process.env.TEAMCITY_VERSION = '8910'
|
||
|
expect(teamcity.detect()).toBe(true)
|
||
|
})
|
||
|
|
||
|
it('can get teamcity env info get_commit_status', function() {
|
||
|
process.env.TEAMCITY_VERSION = '8910'
|
||
|
process.env.BUILD_VCS_NUMBER = '4567'
|
||
|
process.env.BRANCH_NAME = 'ABranch'
|
||
|
process.env.BUILD_NUMBER = '1234'
|
||
|
|
||
|
expect(teamcity.configuration()).toEqual({
|
||
|
service: 'teamcity',
|
||
|
commit: '4567',
|
||
|
branch: 'ABranch',
|
||
|
build: '1234',
|
||
|
})
|
||
|
})
|
||
|
})
|