diff --git a/services/web/app/src/Features/Compile/ClsiStateManager.mjs b/services/web/app/src/Features/Compile/ClsiStateManager.mjs index 10b40f727b..a9302fea5b 100644 --- a/services/web/app/src/Features/Compile/ClsiStateManager.mjs +++ b/services/web/app/src/Features/Compile/ClsiStateManager.mjs @@ -47,7 +47,7 @@ export default { const object = options || {} for (const key in object) { const value = object[key] - if (!['isAutoCompile'].includes(key)) { + if (!['isAutoCompile', 'buildId'].includes(key)) { result.push(`option ${key}:${value}`) } } diff --git a/services/web/test/unit/src/Compile/ClsiStateManager.test.mjs b/services/web/test/unit/src/Compile/ClsiStateManager.test.mjs index 73fee5ffc7..a62aa17377 100644 --- a/services/web/test/unit/src/Compile/ClsiStateManager.test.mjs +++ b/services/web/test/unit/src/Compile/ClsiStateManager.test.mjs @@ -18,7 +18,11 @@ describe('ClsiStateManager', function () { ctx.ClsiStateManager = (await import(modulePath)).default ctx.project = 'project' - ctx.options = { draft: true, isAutoCompile: false } + ctx.options = { + draft: true, + isAutoCompile: false, + buildId: 'original-build-id', + } ctx.callback = sinon.stub() }) @@ -189,5 +193,17 @@ describe('ClsiStateManager', function () { ).to.equal(ctx.hash0) }) }) + + describe('when the buildId option is changed', function () { + beforeEach(function (ctx) { + ctx.options.buildId = 'new-build-id' + }) + + it('should return the same hash value', function (ctx) { + expect( + ctx.ClsiStateManager.computeHash(ctx.project, ctx.options) + ).to.equal(ctx.hash0) + }) + }) }) })