diff --git a/packages/env/src/environment.js b/packages/env/src/environment.js index 325a4d17c..a99e4d331 100644 --- a/packages/env/src/environment.js +++ b/packages/env/src/environment.js @@ -212,13 +212,15 @@ export class PercyEnv { // parallel total & nonce get parallel() { let total = parseInt(this.vars.PERCY_PARALLEL_TOTAL, 10); + if (!Number.isInteger(total)) total = null; - if (this.ci === 'circle') { - total = parseInt(this.vars.CIRCLE_NODE_TOTAL, 10); + if (total === null) { + switch (this.ci) { + case 'circle': + total = parseInt(this.vars.CIRCLE_NODE_TOTAL, 10); + } } - if (!Number.isInteger(total)) total = null; - // no nonce if no total let nonce = total && (() => { if (this.vars.PERCY_PARALLEL_NONCE) {