Skip to content

Commit 79b3c98

Browse files
Copilotkobenguyent
andcommitted
Changes before error encountered
Co-authored-by: kobenguyent <[email protected]>
1 parent 9d21160 commit 79b3c98

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

lib/helper/errors/ElementNotFound.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Locator from '../../locator.js'
21
/**
32
* Uses to throw readable element not found error
43
* Stringify object's locators
@@ -12,7 +11,7 @@ class ElementNotFound {
1211
if (typeof locator === 'object') {
1312
locator = JSON.stringify(locator);
1413
}
15-
throw new Error(`${prefixMessage} "${(new Locator(locator))}" ${postfixMessage}`);
14+
throw new Error(`${prefixMessage} "${locator}" ${postfixMessage}`);
1615
}
1716
}
1817

test/unit/FileSystem_test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ const { expect } = chai
55

66

77

8-
import FileSystem from '../../../lib/helper/FileSystem.js'
8+
import FileSystem from '../../lib/helper/FileSystem.js'
99

1010
const __dirname = path.dirname(fileURLToPath(import.meta.url))
1111
global.codecept_dir = path.join(__dirname, '/..')
12-
import * as codeceptjs from '../../../lib/index.js'
13-
global.codeceptjs = codeceptjs
1412

1513
let fs
1614

test/unit/element_not_found_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
import ElementNotFound from '../../../lib/helper/errors/ElementNotFound.js'
2+
import ElementNotFound from '../../lib/helper/errors/ElementNotFound.js'
33
import chai from 'chai'
44
const { expect } = chai
55

0 commit comments

Comments
 (0)