Skip to content

Commit

Permalink
feat: add AppCircle PR support
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Nov 12, 2024
1 parent a17dd18 commit 1d42c26
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
39 changes: 39 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,45 @@ test('Appcircle', function (t) {
t.end()
})

test('Appcircle - PR', function (t) {
process.env.AC_APPCIRCLE = 'true'
process.env.AC_GIT_PR = 'true'

clearModule('./')
const ci = require('./')

t.equal(ci.isCI, true)
t.equal(ci.isPR, true)
t.equal(ci.name, 'Appcircle')
t.equal(ci.APPCIRCLE, true)
t.equal(ci.id, 'APPCIRCLE')
assertVendorConstants('APPCIRCLE', ci, t)

delete process.env.AC_APPCIRCLE
delete process.env.AC_GIT_PR

t.end()
})

test('Appcircle - Not PR', function (t) {
process.env.AC_APPCIRCLE = 'true'
process.env.AC_GIT_PR = 'false'

clearModule('./')
const ci = require('./')

t.equal(ci.isCI, true)
t.equal(ci.isPR, false)
t.equal(ci.name, 'Appcircle')
t.equal(ci.APPCIRCLE, true)
t.equal(ci.id, 'APPCIRCLE')
assertVendorConstants('APPCIRCLE', ci, t)

delete process.env.AC_APPCIRCLE

t.end()
})

test('Render - PR', function (t) {
process.env.RENDER = 'true'
process.env.IS_PULL_REQUEST = 'true'
Expand Down
3 changes: 2 additions & 1 deletion vendors.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
{
"name": "Appcircle",
"constant": "APPCIRCLE",
"env": "AC_APPCIRCLE"
"env": "AC_APPCIRCLE",
"pr": "AC_GIT_PR"
},
{
"name": "AppVeyor",
Expand Down

0 comments on commit 1d42c26

Please sign in to comment.