Skip to content

Commit

Permalink
fix: correc the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Sep 13, 2024
1 parent 4c2ca8d commit 0d63060
Showing 1 changed file with 35 additions and 5 deletions.
40 changes: 35 additions & 5 deletions test/snapshot/sampleProjects/destructiveCompSets/snapshots.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
await dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'pre1'), pre1TestOutputDir);
const expectedOutputDir = path.join(
snapshotsDir,
'1-pre-destructive-and-1-deployment.expected',
'testOutput',
'pre1'
);
await dirsAreIdentical(expectedOutputDir, pre1TestOutputDir);
});

it('2 pre-destructive and 2 deployments', async () => {
Expand All @@ -82,7 +88,13 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
await dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'pre2'), pre2TestOutputDir);
const expectedOutputDir = path.join(
snapshotsDir,
'2-pre-destructive-and-2-deployments.expected',
'testOutput',
'pre2'
);
await dirsAreIdentical(expectedOutputDir, pre2TestOutputDir);
});

it('1 post-destructive and 1 deployment', async () => {
Expand All @@ -107,7 +119,13 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
await dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post1'), postTestOutputDir);
const expectedOutputDir = path.join(
snapshotsDir,
'1-post-destructive-and-1-deployment.expected',
'testOutput',
'post1'
);
await dirsAreIdentical(expectedOutputDir, postTestOutputDir);
});

it('2 post-destructive and 2 deployments', async () => {
Expand All @@ -132,7 +150,13 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
await dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post2'), post2TestOutputDir);
const expectedOutputDir = path.join(
snapshotsDir,
'2-post-destructive-and-2-deployments.expected',
'testOutput',
'post2'
);
await dirsAreIdentical(expectedOutputDir, post2TestOutputDir);
});

it('1 post-destructive and no deployment', async () => {
Expand All @@ -157,7 +181,13 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
await dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post1-solo'), postTestOutputDir);
const expectedOutputDir = path.join(
snapshotsDir,
'1-post-destructive-and-no-deployment.expected',
'testOutput',
'post1-solo'
);
await dirsAreIdentical(expectedOutputDir, postTestOutputDir);
});

it('throws when wildcards are used in destructive changes', async () => {
Expand Down

2 comments on commit 0d63060

@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: 0d63060 Previous: bc9b9f8 Ratio
eda-componentSetCreate-linux 238 ms 226 ms 1.05
eda-sourceToMdapi-linux 2437 ms 2332 ms 1.05
eda-sourceToZip-linux 1949 ms 1863 ms 1.05
eda-mdapiToSource-linux 2968 ms 2922 ms 1.02
lotsOfClasses-componentSetCreate-linux 449 ms 435 ms 1.03
lotsOfClasses-sourceToMdapi-linux 3871 ms 3666 ms 1.06
lotsOfClasses-sourceToZip-linux 3219 ms 3094 ms 1.04
lotsOfClasses-mdapiToSource-linux 3615 ms 3581 ms 1.01
lotsOfClassesOneDir-componentSetCreate-linux 747 ms 749 ms 1.00
lotsOfClassesOneDir-sourceToMdapi-linux 6518 ms 6536 ms 1.00
lotsOfClassesOneDir-sourceToZip-linux 5824 ms 5726 ms 1.02
lotsOfClassesOneDir-mdapiToSource-linux 6560 ms 6416 ms 1.02

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: 0d63060 Previous: bc9b9f8 Ratio
eda-componentSetCreate-win32 734 ms 719 ms 1.02
eda-sourceToMdapi-win32 4909 ms 4768 ms 1.03
eda-sourceToZip-win32 3282 ms 3272 ms 1.00
eda-mdapiToSource-win32 6517 ms 6404 ms 1.02
lotsOfClasses-componentSetCreate-win32 1224 ms 1320 ms 0.93
lotsOfClasses-sourceToMdapi-win32 7921 ms 8560 ms 0.93
lotsOfClasses-sourceToZip-win32 5426 ms 5555 ms 0.98
lotsOfClasses-mdapiToSource-win32 7991 ms 8700 ms 0.92
lotsOfClassesOneDir-componentSetCreate-win32 2121 ms 2344 ms 0.90
lotsOfClassesOneDir-sourceToMdapi-win32 14325 ms 14337 ms 1.00
lotsOfClassesOneDir-sourceToZip-win32 9578 ms 9823 ms 0.98
lotsOfClassesOneDir-mdapiToSource-win32 14229 ms 14406 ms 0.99

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

Please sign in to comment.