Skip to content

Commit

Permalink
test: unit test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Aug 19, 2024
1 parent 07f3328 commit dc2b291
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/convert/metadataConverter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ describe('MetadataConverter', () => {
const result = await converter.convert(components, 'metadata', { type: 'zip' });

expect(result.zipBuffer).to.deep.equal(testBuffer);
expect(result.zipFileCount).to.equal(1);
});

it('should return packagePath in result', async () => {
Expand Down
2 changes: 2 additions & 0 deletions test/convert/streams.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ describe('Streams', () => {
// NOTE: Zips must only contain files with posix paths
expect(jsZipFileStub.firstCall.args[0]).to.equal('classes/myComponent.cls-meta.xml');
expect(jsZipFileStub.firstCall.args[1]).to.deep.equal(Buffer.from('hi'));
expect(writer.fileCount).to.equal(3);
});

it('should add entries to zip based on given write infos when zip is in-memory only', async () => {
Expand All @@ -495,6 +496,7 @@ describe('Streams', () => {
});
expect(jsZipFileStub.firstCall.args[0]).to.equal('classes/myComponent.cls-meta.xml');
expect(jsZipFileStub.firstCall.args[1]).to.deep.equal(Buffer.from('hi'));
expect(writer.fileCount).to.equal(3);
});

it('should generateAsync zip when stream is finished', async () => {
Expand Down

2 comments on commit dc2b291

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: dc2b291 Previous: 07f3328 Ratio
eda-componentSetCreate-linux 236 ms 233 ms 1.01
eda-sourceToMdapi-linux 2339 ms 2474 ms 0.95
eda-sourceToZip-linux 1825 ms 1952 ms 0.93
eda-mdapiToSource-linux 2889 ms 2939 ms 0.98
lotsOfClasses-componentSetCreate-linux 436 ms 438 ms 1.00
lotsOfClasses-sourceToMdapi-linux 3679 ms 3771 ms 0.98
lotsOfClasses-sourceToZip-linux 3224 ms 3234 ms 1.00
lotsOfClasses-mdapiToSource-linux 3609 ms 3699 ms 0.98
lotsOfClassesOneDir-componentSetCreate-linux 757 ms 780 ms 0.97
lotsOfClassesOneDir-sourceToMdapi-linux 6486 ms 6743 ms 0.96
lotsOfClassesOneDir-sourceToZip-linux 5591 ms 5907 ms 0.95
lotsOfClassesOneDir-mdapiToSource-linux 6431 ms 6518 ms 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: dc2b291 Previous: 07f3328 Ratio
eda-componentSetCreate-win32 628 ms 621 ms 1.01
eda-sourceToMdapi-win32 4150 ms 4172 ms 0.99
eda-sourceToZip-win32 2933 ms 2937 ms 1.00
eda-mdapiToSource-win32 5657 ms 5636 ms 1.00
lotsOfClasses-componentSetCreate-win32 1218 ms 1243 ms 0.98
lotsOfClasses-sourceToMdapi-win32 7560 ms 7517 ms 1.01
lotsOfClasses-sourceToZip-win32 4955 ms 4901 ms 1.01
lotsOfClasses-mdapiToSource-win32 7884 ms 7796 ms 1.01
lotsOfClassesOneDir-componentSetCreate-win32 2081 ms 2075 ms 1.00
lotsOfClassesOneDir-sourceToMdapi-win32 13830 ms 13658 ms 1.01
lotsOfClassesOneDir-sourceToZip-win32 9012 ms 8962 ms 1.01
lotsOfClassesOneDir-mdapiToSource-win32 14051 ms 13923 ms 1.01

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.