Skip to content

Commit

Permalink
(create-wdio): fix yarn plug & play when running setup (#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinheitzman authored Dec 7, 2023
1 parent 1973581 commit db5119a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ export async function createWebdriverIO(opts: ProgramOpts) {
if (!cliInstalled) {
console.log(`\nInstalling ${chalk.bold('@wdio/cli')} to initialize project...`)
const args = [INSTALL_COMMAND[pm]]
if (pm === 'yarn') {
args.push('--exact', '--cwd', root)
}
if (opts.dev) {
args.push(DEV_FLAG[pm])
}
Expand Down
2 changes: 1 addition & 1 deletion tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ test('createWebdriverIO with Yarn', async () => {
await createWebdriverIO({ npmTag: 'latest' } as ProgramOpts)
expect(runProgram).toBeCalledWith(
'yarn',
['add', '--exact', '--cwd', expect.any(String), '@wdio/cli@latest'],
['add', '@wdio/cli@latest'],
expect.any(Object)
)
expect(runProgram).toBeCalledWith(
Expand Down

0 comments on commit db5119a

Please sign in to comment.