setup-php/node_modules/codecov/test/services/teamcity.test.js

23 lines
616 B
JavaScript
Raw Normal View History

2019-09-20 09:41:20 +07:00
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',
})
})
})