Skip to content

Commit 24e584c

Browse files
committed
Update test cases
1 parent 14c5905 commit 24e584c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

packages/contentstack-export/test/unit/export/modules/marketplace-apps.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,16 @@ describe('ExportMarketplaceApps', () => {
339339
const exportAppsStub = sinon.stub(exportMarketplaceApps, 'exportApps').resolves();
340340
const getAppManifestAndAppConfigStub = sinon.stub(exportMarketplaceApps, 'getAppManifestAndAppConfig').resolves();
341341

342+
// Avoid CLIProgressManager.createNested / completeProgressWithMessage touching real TTY progress (can hang in CI).
343+
const chain = { updateStatus: sinon.stub().returnsThis() };
344+
const progressStub = {
345+
addProcess: sinon.stub(),
346+
startProcess: sinon.stub().returns(chain),
347+
completeProcess: sinon.stub(),
348+
};
349+
const createNestedProgressStub = sinon.stub(exportMarketplaceApps, 'createNestedProgress').returns(progressStub as any);
350+
const completeProgressWithMessageStub = sinon.stub(exportMarketplaceApps, 'completeProgressWithMessage');
351+
342352
await exportMarketplaceApps.start();
343353

344354
expect((marketplaceAppHelper.createNodeCryptoInstance as sinon.SinonStub).calledOnce).to.be.true;
@@ -348,6 +358,8 @@ describe('ExportMarketplaceApps', () => {
348358
getAppsCountStub.restore();
349359
exportAppsStub.restore();
350360
getAppManifestAndAppConfigStub.restore();
361+
createNestedProgressStub.restore();
362+
completeProgressWithMessageStub.restore();
351363
configHandlerGetStub.restore();
352364
});
353365
});

0 commit comments

Comments
 (0)