Skip to content

Commit 1f6991d

Browse files
Copilotkobenguyent
andcommitted
Convert more CJS to ESM: WebElement, enhancedRetryFailedStep plugin
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
1 parent 1b800ac commit 1f6991d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/element/WebElement.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const assert = require('assert')
1+
import assert from 'assert'
22

33
/**
44
* Unified WebElement class that wraps native element instances from different helpers
@@ -324,4 +324,4 @@ class WebElement {
324324
}
325325
}
326326

327-
module.exports = WebElement
327+
export default WebElement

lib/plugin/enhancedRetryFailedStep.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const event = require('../event')
2-
const recorder = require('../recorder')
3-
const store = require('../store')
4-
const output = require('../output')
5-
const { RETRY_PRIORITIES } = require('../retryCoordinator')
1+
import event from '../event.js'
2+
import recorder from '../recorder.js'
3+
import store from '../store.js'
4+
import output from '../output.js'
5+
import { RETRY_PRIORITIES } from '../retryCoordinator.js'
66

77
const defaultConfig = {
88
retries: 3,
@@ -17,7 +17,7 @@ const defaultConfig = {
1717
* This plugin provides step-level retries and coordinates with global retry settings
1818
* to avoid conflicts and provide predictable behavior.
1919
*/
20-
module.exports = config => {
20+
export default config => {
2121
config = Object.assign({}, defaultConfig, config)
2222
config.ignoredSteps = config.ignoredSteps.concat(config.defaultIgnoredSteps)
2323
const customWhen = config.when

0 commit comments

Comments
 (0)