Skip to content

Commit 1d42c26

Browse files
committed
feat: add AppCircle PR support
1 parent a17dd18 commit 1d42c26

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

test.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,45 @@ test('Appcircle', function (t) {
422422
t.end()
423423
})
424424

425+
test('Appcircle - PR', function (t) {
426+
process.env.AC_APPCIRCLE = 'true'
427+
process.env.AC_GIT_PR = 'true'
428+
429+
clearModule('./')
430+
const ci = require('./')
431+
432+
t.equal(ci.isCI, true)
433+
t.equal(ci.isPR, true)
434+
t.equal(ci.name, 'Appcircle')
435+
t.equal(ci.APPCIRCLE, true)
436+
t.equal(ci.id, 'APPCIRCLE')
437+
assertVendorConstants('APPCIRCLE', ci, t)
438+
439+
delete process.env.AC_APPCIRCLE
440+
delete process.env.AC_GIT_PR
441+
442+
t.end()
443+
})
444+
445+
test('Appcircle - Not PR', function (t) {
446+
process.env.AC_APPCIRCLE = 'true'
447+
process.env.AC_GIT_PR = 'false'
448+
449+
clearModule('./')
450+
const ci = require('./')
451+
452+
t.equal(ci.isCI, true)
453+
t.equal(ci.isPR, false)
454+
t.equal(ci.name, 'Appcircle')
455+
t.equal(ci.APPCIRCLE, true)
456+
t.equal(ci.id, 'APPCIRCLE')
457+
assertVendorConstants('APPCIRCLE', ci, t)
458+
459+
delete process.env.AC_APPCIRCLE
460+
461+
t.end()
462+
})
463+
425464
test('Render - PR', function (t) {
426465
process.env.RENDER = 'true'
427466
process.env.IS_PULL_REQUEST = 'true'

vendors.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
{
99
"name": "Appcircle",
1010
"constant": "APPCIRCLE",
11-
"env": "AC_APPCIRCLE"
11+
"env": "AC_APPCIRCLE",
12+
"pr": "AC_GIT_PR"
1213
},
1314
{
1415
"name": "AppVeyor",

0 commit comments

Comments
 (0)