Skip to content

Commit

Permalink
fix: handle appcircle false value
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Nov 12, 2024
1 parent 5a3692a commit 6facb27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 3 additions & 4 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ test('Visual Studio App Center', function (t) {
const ci = require('./')

t.equal(ci.isCI, true)
// t.equal(ci.isPR, false)
t.equal(ci.isPR, null)
t.equal(ci.name, 'Visual Studio App Center')
t.equal(ci.APPCENTER, true)
t.equal(ci.id, 'APPCENTER')
Expand Down Expand Up @@ -914,7 +914,7 @@ test('Xcode Server - Not PR', function (t) {
const ci = require('./')

t.equal(ci.isCI, true)
// t.equal(ci.isPR, false)
t.equal(ci.isPR, null)
t.equal(ci.name, 'Xcode Server')
t.equal(ci.XCODE_SERVER, true)
t.equal(ci.id, 'XCODE_SERVER')
Expand Down Expand Up @@ -1035,7 +1035,6 @@ test('Agola CI - PR', function (t) {

test('Vela', function (t) {
process.env.VELA = 'true'
process.env.VELA_PULL_REQUEST = '2'

clearModule('./')
const ci = require('./')
Expand All @@ -1048,7 +1047,6 @@ test('Vela', function (t) {
assertVendorConstants('VELA', ci, t)

delete process.env.VELA
delete process.env.VELA_PULL_REQUEST

t.end()
})
Expand Down Expand Up @@ -1139,6 +1137,7 @@ test('AWS Codebuild - PR', function (t) {
assertVendorConstants('CODEBUILD', ci, t)

delete process.env.CODEBUILD_BUILD_ARN
delete process.env.CODEBUILD_WEBHOOK_EVENT

t.end()
})
Expand Down
5 changes: 4 additions & 1 deletion vendors.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"name": "Appcircle",
"constant": "APPCIRCLE",
"env": "AC_APPCIRCLE",
"pr": "AC_GIT_PR"
"pr": {
"env": "AC_GIT_PR",
"ne": "false"
}
},
{
"name": "AppVeyor",
Expand Down

0 comments on commit 6facb27

Please sign in to comment.