3
3
import fs from 'fs'
4
4
import path from 'path'
5
5
import { ClientFunction , Selector } from 'testcafe'
6
- import { queries } from 'dom- testing-library'
6
+ import { queries } from '@ testing-library/dom '
7
7
8
8
const DOM_TESTING_LIBRARY_UMD_PATH = path . join (
9
9
'./node_modules' ,
10
- 'dom- testing-library/dist/dom- testing-library.umd.js' ,
10
+ '@ testing-library/dom/ dist/@ testing-library/dom .umd.js' ,
11
11
)
12
12
const DOM_TESTING_LIBRARY_UMD = fs . readFileSync ( DOM_TESTING_LIBRARY_UMD_PATH ) . toString ( )
13
13
@@ -17,7 +17,7 @@ const DOM_TESTING_LIBRARY_UMD = fs.readFileSync(DOM_TESTING_LIBRARY_UMD_PATH).to
17
17
export async function configure ( options , t ) {
18
18
const configFunction =
19
19
`
20
- window.DomTestingLibrary .configure(${ JSON . stringify ( options ) } );
20
+ window.TestingLibraryDom .configure(${ JSON . stringify ( options ) } );
21
21
` ;
22
22
await new ClientFunction ( new Function ( configFunction ) ) ( ) ;
23
23
@@ -63,7 +63,7 @@ Object.keys(queries).forEach(queryName => {
63
63
module . exports [ queryName ] = Selector (
64
64
new Function (
65
65
`
66
- return DomTestingLibrary .${ queryName } (document.body, ...arguments);
66
+ return TestingLibraryDom .${ queryName } (document.body, ...arguments);
67
67
` ,
68
68
) ,
69
69
)
@@ -77,7 +77,7 @@ export const within = async sel => {
77
77
78
78
window.TestcafeTestingLibrary = window.TestcafeTestingLibrary || {}
79
79
const elem = document.querySelector("${ sanitizedSel } ");
80
- window.TestcafeTestingLibrary["within_${ sanitizedSel } "] = DomTestingLibrary .within(elem);
80
+ window.TestcafeTestingLibrary["within_${ sanitizedSel } "] = TestingLibraryDom .within(elem);
81
81
82
82
` ,
83
83
) ,
0 commit comments