UNPKG

623 BJavaScriptView Raw
1var codeship = require('../../lib/services/codeship')
2
3describe('Codeship CI Provider', function() {
4 it('can detect codeship', function() {
5 process.env.CI_NAME = 'codeship'
6 expect(codeship.detect()).toBe(true)
7 })
8
9 it('can get codeship env info', function() {
10 process.env.CI_BUILD_NUMBER = '1234'
11 process.env.CI_COMMIT_ID = '5678'
12 process.env.CI_BRANCH = 'master'
13 process.env.CI_BUILD_URL = 'https://...'
14
15 expect(codeship.configuration()).toEqual({
16 service: 'codeship',
17 commit: '5678',
18 build: '1234',
19 branch: 'master',
20 build_url: 'https://...',
21 })
22 })
23})