diff --git a/test/nuts/manifest/manifestCreate.nut.ts b/test/nuts/manifest/manifestCreate.nut.ts index 39009c2a..ee9bd53e 100644 --- a/test/nuts/manifest/manifestCreate.nut.ts +++ b/test/nuts/manifest/manifestCreate.nut.ts @@ -11,7 +11,7 @@ import { join } from 'node:path'; import { TestSession } from '@salesforce/cli-plugins-testkit'; import { execCmd } from '@salesforce/cli-plugins-testkit'; import { Dictionary } from '@salesforce/ts-types'; -import { expect } from 'chai'; +import { config, expect } from 'chai'; describe('project generate manifest', () => { let session: TestSession; @@ -120,4 +120,26 @@ describe('project generate manifest', () => { expect(stats.isFile()).to.be.true; expect(stats.size).to.be.greaterThan(100); }); + + it('should produce the same manifest from an org every time', async () => { + config.truncateThreshold = 0; + + execCmd(`project generate manifest --from-org ${orgAlias} -n org-metadata-1.xml`, { + ensureExitCode: 0, + }); + const manifest1 = fs.readFileSync(join(session.project.dir, 'org-metadata-1.xml'), 'utf-8'); + + execCmd(`project generate manifest --from-org ${orgAlias} -n org-metadata-2.xml`, { + ensureExitCode: 0, + }); + const manifest2 = fs.readFileSync(join(session.project.dir, 'org-metadata-2.xml'), 'utf-8'); + + execCmd(`project generate manifest --from-org ${orgAlias} -n org-metadata-3.xml`, { + ensureExitCode: 0, + }); + const manifest3 = fs.readFileSync(join(session.project.dir, 'org-metadata-3.xml'), 'utf-8'); + + expect(manifest1).to.equal(manifest2); + expect(manifest2).to.equal(manifest3); + }); });