-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
(webdriver): re-export command #10731
Conversation
} | ||
} | ||
|
||
module.exports = WebDriver | ||
exports.command = command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exports.command = command | |
module.exports.command = command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module.exports = WebDriver
which has command
as static property, so it should be the same, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test seem to pass:
const WebDriver = require('../../packages/webdriver')
const command = require('../../packages/webdriver').command
assert.equal(typeof WebDriver.command, 'function')
assert.equal(typeof command, 'function')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I didn't see the refactor above, this was a suggestion based on the initial commit. let me try.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep this should work now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Proposed changes
Make what is documented here work when using CJS.
Types of changes
Checklist
Further comments
Thanks @jlipps for reporting.
Reviewers: @webdriverio/project-committers