Format and lint unit tests

This commit is contained in:
IvanZosimov 2023-05-17 14:14:15 +02:00
parent 4c5e506750
commit b50a1c9fbf

View File

@ -25,9 +25,8 @@ describe('installer tests', () => {
const maxSatisfyingSpy = jest.spyOn(semver, 'maxSatisfying'); const maxSatisfyingSpy = jest.spyOn(semver, 'maxSatisfying');
const chmodSyncSpy = jest.spyOn(fs, 'chmodSync'); const chmodSyncSpy = jest.spyOn(fs, 'chmodSync');
const readdirSpy = jest.spyOn(fspromises, 'readdir'); const readdirSpy = jest.spyOn(fspromises, 'readdir');
describe('installDotnet() tests', () => {
describe('installDotnet() tests', () => {
beforeAll(() => { beforeAll(() => {
whichSpy.mockImplementation(() => Promise.resolve('PathToShell')); whichSpy.mockImplementation(() => Promise.resolve('PathToShell'));
chmodSyncSpy.mockImplementation(() => {}); chmodSyncSpy.mockImplementation(() => {});
@ -42,7 +41,7 @@ describe('installer tests', () => {
const inputVersion = '3.1.100'; const inputVersion = '3.1.100';
const inputQuality = '' as QualityOptions; const inputQuality = '' as QualityOptions;
const errorMessage = 'fictitious error message!'; const errorMessage = 'fictitious error message!';
getExecOutputSpy.mockImplementation(() => { getExecOutputSpy.mockImplementation(() => {
return Promise.resolve({ return Promise.resolve({
exitCode: 1, exitCode: 1,
@ -51,7 +50,6 @@ describe('installer tests', () => {
}); });
}); });
const dotnetInstaller = new installer.DotnetCoreInstaller( const dotnetInstaller = new installer.DotnetCoreInstaller(
inputVersion, inputVersion,
inputQuality inputQuality