Fix informational and debug messages

This commit is contained in:
IvanZosimov
2023-05-18 12:39:22 +02:00
parent 3cf3e230c1
commit 38b49fb717
5 changed files with 17 additions and 19 deletions

View File

@ -119,7 +119,7 @@ describe('installer tests', () => {
await dotnetInstaller.installDotnet();
expect(warningSpy).toHaveBeenCalledWith(
`'dotnet-quality' input can be used only with .NET SDK version in A.B, A.B.x, A and A.x formats where the major tag is higher than 5. You specified: ${inputVersion}. 'dotnet-quality' input is ignored.`
`The 'dotnet-quality' input can be used only with .NET SDK version in A.B, A.B.x, A, A.x and A.B.Cxx formats where the major tag is higher than 5. You specified: ${inputVersion}. 'dotnet-quality' input is ignored.`
);
});
@ -145,7 +145,7 @@ describe('installer tests', () => {
await dotnetInstaller.installDotnet();
expect(warningSpy).toHaveBeenCalledWith(
`'dotnet-quality' input can be used only with .NET SDK version in A.B, A.B.x, A and A.x formats where the major tag is higher than 5. You specified: ${inputVersion}. 'dotnet-quality' input is ignored.`
`The 'dotnet-quality' input can be used only with .NET SDK version in A.B, A.B.x, A, A.x and A.B.Cxx formats where the major tag is higher than 5. You specified: ${inputVersion}. 'dotnet-quality' input is ignored.`
);
});

View File

@ -59,7 +59,7 @@ describe('setup-dotnet tests', () => {
const expectedDebugMessage =
'No version found, trying to find version from global.json';
const expectedInfoMessage = `global.json wasn't found in the root directory. No .NET version will be installed.`;
const expectedInfoMessage = `A global.json wasn't found in the root directory. No .NET version will be installed.`;
await setup.run();
@ -73,7 +73,7 @@ describe('setup-dotnet tests', () => {
inputs['dotnet-version'] = ['6.0'];
inputs['dotnet-quality'] = 'fictitiousQuality';
const expectedErrorMessage = `${inputs['dotnet-quality']} is not a supported value for 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`;
const expectedErrorMessage = `Value '${inputs['dotnet-quality']}' is not supported for the 'dotnet-quality' option. Supported values are: daily, signed, validated, preview, ga.`;
await setup.run();
expect(setFailedSpy).toHaveBeenCalledWith(expectedErrorMessage);
@ -160,7 +160,7 @@ describe('setup-dotnet tests', () => {
it(`shouldn't call setOutput() if actions didn't install .NET`, async () => {
inputs['dotnet-version'] = [];
const warningMessage = `No .NET version was installed. The 'dotnet-version' output will not be set.`;
const warningMessage = `The 'dotnet-version' output will not be set.`;
addToPathSpy.mockImplementation(() => {});