Skip to content

(fix) wdio-cucumber-framework: fix error after #10134#10327

Merged
christian-bromann merged 1 commit intowebdriverio:mainfrom
egerix:main
May 8, 2023
Merged

(fix) wdio-cucumber-framework: fix error after #10134#10327
christian-bromann merged 1 commit intowebdriverio:mainfrom
egerix:main

Conversation

@egerix
Copy link
Contributor

@egerix egerix commented May 5, 2023

Proposed changes

The use of the @skip tag could lead to an error:

TypeError: Cannot read properties of undefined (reading 'split')
 ❯ parse packages/wdio-cucumber-framework/src/utils.ts:165:18
    163| 
    164|     const parse = (skipExpr: string) =>
    165|         skipExpr.split(';').reduce((acc: Record<string, string>, splitItem: string) => {
       |                  ^
    166|             const pos = splitItem.indexOf('=')
    167|             if (pos > 0) {
 ❯ packages/wdio-cucumber-framework/src/utils.ts:180:19

This pull request contains a fix for an error that was introduced in a previous pull request (#10134). The mistake has been identified and corrected in this PR.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

Reviewers: @webdriverio/project-committers

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@christian-bromann christian-bromann added the PR: Bug Fix 🐛 PRs that contain bug fixes label May 8, 2023
@christian-bromann christian-bromann merged commit f907fee into webdriverio:main May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Bug Fix 🐛 PRs that contain bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants