Skip to content

types: fix hook array #4114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2019
Merged

types: fix hook array #4114

merged 1 commit into from
Jun 25, 2019

Conversation

mgrybyk
Copy link
Member

@mgrybyk mgrybyk commented Jun 25, 2019

Proposed changes

Hook types should also allow arrays.

I know that some hooks don't support arrays, not sure which exactly. Assuming following hooks to accept functions and array of functions: "onPrepare" | "onComplete" | "before" | "after" | "beforeSession" | "afterSession"

Hooks: onPrepare, onComplete, onReload, before, beforeCommand, beforeHook, beforeSession, beforeSuite, beforeTest, afterHook, after, afterCommand, afterSession, afterSuite, afterTest, beforeFeature, beforeScenario, beforeStep, afterFeature, afterScenario, afterStep

Let me know what other hooks should be added.

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)

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)

Further comments

fix #4104

Reviewers: @webdriverio/technical-committee

@mgrybyk mgrybyk added the PR: Docs 📝 PRs that contain changes to the documentation label Jun 25, 2019
@codecov
Copy link

codecov bot commented Jun 25, 2019

Codecov Report

Merging #4114 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4114   +/-   ##
=======================================
  Coverage   99.25%   99.25%           
=======================================
  Files         163      163           
  Lines        3913     3913           
  Branches      863      863           
=======================================
  Hits         3884     3884           
  Misses         26       26           
  Partials        3        3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10375ce...38a0b4a. Read the comment docs.

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.

👍

@christian-bromann christian-bromann merged commit faa1d12 into webdriverio:master Jun 25, 2019
@mgrybyk mgrybyk deleted the fix-hooks-typings branch July 9, 2019 08:52
yamkay pushed a commit to MoveInc/webdriverio that referenced this pull request Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Docs 📝 PRs that contain changes to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unable to pass hook typechecks after upgrading to version 5.10.7
2 participants