Skip to content

Commit

Permalink
Fix moduleLoaderFlag (#13768)
Browse files Browse the repository at this point in the history
Fix moduleLoaderFlag for Node >= 21 where minor version is < 6
  • Loading branch information
jenskuhrjorgensen authored Oct 16, 2024
1 parent 06a7c8c commit ee692d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/wdio-cli/tests/commands/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ describe('Command: run', () => {
await runCmd.handler({ configPath: '/wdio.conf.ts' } as any)
expect(execa).toBeCalledTimes(1)
const moduleLoaderFlag = (
(runCmd.nodeVersion('major') >= 20 && runCmd.nodeVersion('minor') >= 6) ||
runCmd.nodeVersion('major') >= 21 ||
(runCmd.nodeVersion('major') === 20 && runCmd.nodeVersion('minor') >= 6) ||
(runCmd.nodeVersion('major') === 18 && runCmd.nodeVersion('minor') >= 19)
)
? '--import'
Expand Down

0 comments on commit ee692d1

Please sign in to comment.