Skip to content

Commit

Permalink
Disable verbose yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Vasin committed Mar 1, 2021
1 parent 40fd038 commit 2baca1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 23 deletions.
11 changes: 4 additions & 7 deletions deploy/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,10 @@ export const main = async (): Promise<void> => {

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
Expand Down
17 changes: 1 addition & 16 deletions deploy/test/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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', {
Expand All @@ -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()

Expand Down

0 comments on commit 2baca1f

Please sign in to comment.