Skip to content

Commit

Permalink
fix: guess nuts
Browse files Browse the repository at this point in the history
  • Loading branch information
iowillhoit committed May 8, 2023
1 parent 7eaa547 commit 95849e4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/nuts/suggestType/suggestType.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('suggest types', () => {
} catch (err) {
const error = err as SfError;
expect(error.name).to.equal('TypeInferenceError');
expect(error.actions).to.include('A search for the ".clss" filename suffix found the following close matches:');
expect(error.actions).to.include('A metadata type lookup for "DummyClass.clss" found the following close matches:');
expect(error.actions).to.include('-- Did you mean ".cls" instead for the "ApexClass" metadata type?');
}
});
Expand All @@ -74,7 +74,7 @@ describe('suggest types', () => {
const error = err as SfError;
expect(error.name).to.equal('TypeInferenceError');
expect(error.actions).to.include(
'A search for the ".Layout-meta.xml" metadata suffix found the following close matches:'
'A metadata type lookup for "MyTestObject__c-MyTestObject Layout.Layout-meta.xml" found the following close matches:'
);
expect(error.actions).to.include('-- Did you mean ".layout-meta.xml" instead for the "Layout" metadata type?');
}
Expand All @@ -90,7 +90,7 @@ describe('suggest types', () => {
const error = err as SfError;
expect(error.name).to.equal('TypeInferenceError');
expect(error.actions).to.include(
'A search for the ".tabsss-meta.xml" metadata suffix found the following close matches:'
'A metadata type lookup for "Settings.tabsss-meta.xml" found the following close matches:'
);
expect(error.actions).to.include(
'-- Did you mean ".labels-meta.xml" instead for the "CustomLabels" metadata type?'
Expand Down Expand Up @@ -121,7 +121,7 @@ describe('suggest types', () => {
expect((await cs.getObject()).Package.types[0].name).to.equal('EmailServicesFunction');
});

// This will likely not provide great suggestions, but at least the user is alerted to file causing the issue
// This uses the closeMetaSuffix lookup
it('it errors on very incorrectly named metadata', async () => {
try {
await ComponentSetBuilder.build({
Expand All @@ -131,8 +131,8 @@ describe('suggest types', () => {
} catch (err) {
const error = err as SfError;
expect(error.name).to.equal('TypeInferenceError');
expect(error.actions).to.include('A search for the ".xml" filename suffix found the following close matches:');
expect(error.actions).to.include('-- Did you mean ".xml" instead for the "EmailServicesFunction" metadata type?');
expect(error.actions).to.include('A metadata type lookup for "CustomLabels.labels.xml" found the following close matches:');
expect(error.actions).to.include('-- Did you mean ".labels-meta.xml" instead for the "CustomLabels" metadata type?');
}
});

Expand Down

2 comments on commit 95849e4

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 95849e4 Previous: 6c5d1b9 Ratio
eda-componentSetCreate-linux 232 ms 313 ms 0.74
eda-sourceToMdapi-linux 6939 ms 7080 ms 0.98
eda-sourceToZip-linux 5772 ms 6110 ms 0.94
eda-mdapiToSource-linux 4274 ms 5284 ms 0.81
lotsOfClasses-componentSetCreate-linux 490 ms 563 ms 0.87
lotsOfClasses-sourceToMdapi-linux 8794 ms 10949 ms 0.80
lotsOfClasses-sourceToZip-linux 6996 ms 8086 ms 0.87
lotsOfClasses-mdapiToSource-linux 4911 ms 6608 ms 0.74
lotsOfClassesOneDir-componentSetCreate-linux 764 ms 917 ms 0.83
lotsOfClassesOneDir-sourceToMdapi-linux 12795 ms 15280 ms 0.84
lotsOfClassesOneDir-sourceToZip-linux 10488 ms 12803 ms 0.82
lotsOfClassesOneDir-mdapiToSource-linux 8816 ms 12024 ms 0.73

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

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 95849e4 Previous: 6c5d1b9 Ratio
eda-componentSetCreate-win32 637 ms 482 ms 1.32
eda-sourceToMdapi-win32 9825 ms 8897 ms 1.10
eda-sourceToZip-win32 6951 ms 6126 ms 1.13
eda-mdapiToSource-win32 9871 ms 9808 ms 1.01
lotsOfClasses-componentSetCreate-win32 1099 ms 1082 ms 1.02
lotsOfClasses-sourceToMdapi-win32 14723 ms 12923 ms 1.14
lotsOfClasses-sourceToZip-win32 9139 ms 8574 ms 1.07
lotsOfClasses-mdapiToSource-win32 11839 ms 11478 ms 1.03
lotsOfClassesOneDir-componentSetCreate-win32 1898 ms 1873 ms 1.01
lotsOfClassesOneDir-sourceToMdapi-win32 23513 ms 22093 ms 1.06
lotsOfClassesOneDir-sourceToZip-win32 15636 ms 14655 ms 1.07
lotsOfClassesOneDir-mdapiToSource-win32 20822 ms 20747 ms 1.00

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

Please sign in to comment.