1 | var teamcity = require('../../lib/services/teamcity')
|
2 |
|
3 | describe('TeamCity CI Provider', function() {
|
4 | it('can detect teamcity', function() {
|
5 | process.env.TEAMCITY_VERSION = '8910'
|
6 | expect(teamcity.detect()).toBe(true)
|
7 | })
|
8 |
|
9 | it('can get teamcity env info get_commit_status', function() {
|
10 | process.env.TEAMCITY_VERSION = '8910'
|
11 | process.env.BUILD_VCS_NUMBER = '4567'
|
12 | process.env.BRANCH_NAME = 'ABranch'
|
13 | process.env.BUILD_NUMBER = '1234'
|
14 |
|
15 | expect(teamcity.configuration()).toEqual({
|
16 | service: 'teamcity',
|
17 | commit: '4567',
|
18 | branch: 'ABranch',
|
19 | build: '1234',
|
20 | })
|
21 | })
|
22 | })
|