From 2baca1ff35dac7fb6dd694f40647dc74699e77e5 Mon Sep 17 00:00:00 2001 From: Max Vasin Date: Tue, 2 Mar 2021 00:27:46 +0300 Subject: [PATCH] Disable verbose yarn --- deploy/src/main.ts | 11 ++++------- deploy/test/main.test.ts | 17 +---------------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/deploy/src/main.ts b/deploy/src/main.ts index f4b17d5..46770c3 100644 --- a/deploy/src/main.ts +++ b/deploy/src/main.ts @@ -79,13 +79,10 @@ export const main = async (): Promise => { core.info(`installing application dependencies`) - execSync( - `yarn install --frozen-lockfile${core.isDebug() ? ' --verbose' : ''}`, - { - cwd: appDir, - stdio: 'inherit', - } - ) + execSync(`yarn install --frozen-lockfile`, { + cwd: appDir, + stdio: 'inherit', + }) const randomizer = parseBoolean(core.getInput('randomize_name')) ? randomize diff --git a/deploy/test/main.test.ts b/deploy/test/main.test.ts index 11f7cc9..eb129e7 100644 --- a/deploy/test/main.test.ts +++ b/deploy/test/main.test.ts @@ -36,7 +36,6 @@ const mLatestVersion = mocked(latestVersion) const mGetCLI = mocked(getCLI) const mWriteResolveRc = mocked(writeResolveRc) const mDescribeApp = mocked(describeApp) -const mCoreIsDebug = mocked(core.isDebug) const getPackageContent = (): Package | undefined => { const data = mWriteFile.mock.calls.find( @@ -265,7 +264,7 @@ test('throw error in registry is invalid URL', async () => { await expect(main()).rejects.toBeInstanceOf(Error) }) -test('app dependencies installation (debug: off)', async () => { +test('app dependencies installation', async () => { await main() expect(mExec).toHaveBeenCalledWith('yarn install --frozen-lockfile', { @@ -274,20 +273,6 @@ test('app dependencies installation (debug: off)', async () => { }) }) -test('app dependencies installation (debug: on)', async () => { - mCoreIsDebug.mockReturnValueOnce(true) - - await main() - - expect(mExec).toHaveBeenCalledWith( - 'yarn install --frozen-lockfile --verbose', - { - cwd: '/source/dir', - stdio: 'inherit', - } - ) -}) - test('cloud CLI requested', async () => { await main()