Skip to content

Commit 1e264d6

Browse files
committed
test: fix convert NUT
1 parent 357e721 commit 1e264d6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/nuts/convert/mdapi.nut.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,17 @@ describe('project convert mdapi NUTs', () => {
8282
expect(fs.existsSync(convertedToSrcPath)).to.be.true;
8383
});
8484

85-
it('should convert the dreamhouse project using metadata flag', () => {
85+
it('should convert the dreamhouse project using metadata flag', async () => {
8686
const convertedToSrcPath = path.join(session.dir, 'convertedToSrcPath_metadataFlag');
8787
const result = execCmd<ConvertMdapiJson>(
8888
`project:convert:mdapi -r ${convertedToMdPath} -d ${convertedToSrcPath} -m ApexClass --json`
8989
);
9090
expect(result.jsonOutput?.status).to.equal(0);
9191
expect(result.jsonOutput?.result).to.be.an('array').with.length.greaterThan(10);
9292
expect(fs.existsSync(convertedToSrcPath)).to.be.true;
93-
expect(result.jsonOutput).to.not.be.undefined;
94-
result.jsonOutput?.result.forEach((md) => {
95-
expect(md.filePath.startsWith(convertedToSrcPath)).to.be.true;
96-
});
93+
94+
const files = await fs.promises.readdir(path.join(convertedToSrcPath, 'main', 'default', 'classes'));
95+
expect(files.length).to.equal(result.jsonOutput?.result.length);
9796
});
9897

9998
it('should convert the dreamhouse project using metadatapath flag', () => {

0 commit comments

Comments
 (0)