@@ -68,7 +68,7 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
6868 return this . _framework
6969 }
7070
71- private async getEnvOptions ( ) {
71+ private async _getEnvOptions ( ) {
7272 return await getEnvOptions ( this . configManager , this . _workspaceFolder )
7373 }
7474
@@ -79,7 +79,7 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
7979 try {
8080 const worker = await this . getWorker ( )
8181 const config = await worker . rpc . loadWdioConfig ( {
82- env : await this . getEnvOptions ( ) ,
82+ env : await this . _getEnvOptions ( ) ,
8383 configFilePath : this . wdioConfigPath ,
8484 } )
8585
@@ -95,7 +95,7 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
9595 this . _specPatterns = config . specPatterns
9696
9797 // Get specs from configuration
98- const allSpecs = this . convertPathString ( config . specs )
98+ const allSpecs = this . _convertPathString ( config . specs )
9999
100100 if ( allSpecs . length < 1 ) {
101101 log . debug ( 'No spec files found in configuration' )
@@ -105,7 +105,7 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
105105 log . debug ( `Discovered ${ allSpecs . length } spec files` )
106106
107107 // Register all specs
108- return await this . resisterSpecs ( allSpecs )
108+ return await this . _resisterSpecs ( allSpecs )
109109 } catch ( error ) {
110110 log . error ( `Failed to discover tests: ${ ( error as Error ) . message } ` )
111111 log . trace ( `Failed to discover tests: ${ ( error as Error ) . stack } ` )
@@ -120,7 +120,7 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
120120 try {
121121 const worker = await this . getWorker ( )
122122 const config = await worker . rpc . loadWdioConfig ( {
123- env : await this . getEnvOptions ( ) ,
123+ env : await this . _getEnvOptions ( ) ,
124124 configFilePath : this . wdioConfigPath ,
125125 } )
126126 if ( ! config ) {
@@ -131,10 +131,10 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
131131 this . _specPatterns = config . specPatterns
132132
133133 // Get specs from configuration
134- const allConfigSpecs = this . convertPathString ( config . specs )
134+ const allConfigSpecs = this . _convertPathString ( config . specs )
135135 if ( ! filePaths || filePaths . length === 0 ) {
136136 for ( const [ fileId ] of this . _fileMap . entries ( ) ) {
137- this . removeSpecFileById ( fileId )
137+ this . _removeSpecFileById ( fileId )
138138 }
139139 }
140140 // Filter specs to only include those that match the provided file paths
@@ -158,7 +158,7 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
158158 }
159159 }
160160 // Register the updated spec files
161- await this . resisterSpecs ( specsToReload , false )
161+ await this . _resisterSpecs ( specsToReload , false )
162162
163163 log . debug ( `Successfully reloaded ${ specsToReload . length } spec files` )
164164 } catch ( error ) {
@@ -178,7 +178,7 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
178178 }
179179 }
180180
181- private getTestFileId ( wdioConfigTestItem : vscode . TestItem , testFilePath : string ) {
181+ private _getTestFileId ( wdioConfigTestItem : vscode . TestItem , testFilePath : string ) {
182182 return [ wdioConfigTestItem . id , testFilePath ] . join ( TEST_ID_SEPARATOR )
183183 }
184184
@@ -187,14 +187,14 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
187187 * @param specs Paths to spec files
188188 * @param replaceAllSpecFiles if all spec files to resister, this parameter must be true
189189 */
190- private async resisterSpecs ( specs : string [ ] , replaceAllSpecFiles : boolean = true ) {
190+ private async _resisterSpecs ( specs : string [ ] , replaceAllSpecFiles : boolean = true ) {
191191 if ( replaceAllSpecFiles ) {
192192 this . _fileMap . clear ( )
193193 }
194194 log . debug ( `Spec files registration is started for: ${ specs . length } files.` )
195195 const worker = await this . getWorker ( )
196196 const testData = await worker . rpc . readSpecs ( {
197- env : await this . getEnvOptions ( ) ,
197+ env : await this . _getEnvOptions ( ) ,
198198 specs,
199199 } )
200200
@@ -203,11 +203,11 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
203203 testData . map ( async ( test ) => {
204204 try {
205205 // Create TestItem testFile by testFile
206- const fileId = this . getTestFileId ( this . _wdioConfigTestItem , test . spec )
206+ const fileId = this . _getTestFileId ( this . _wdioConfigTestItem , test . spec )
207207
208208 const specFileUri = vscode . Uri . file ( test . spec )
209209
210- const fileTestItem = this . resisterSpecFile ( fileId , specFileUri )
210+ const fileTestItem = this . _resisterSpecFile ( fileId , specFileUri )
211211 for ( const testCase of test . tests ) {
212212 fileTestItem . children . add (
213213 testTreeCreator ( this , this . _metadata , fileId , testCase , specFileUri )
@@ -241,11 +241,11 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
241241 */
242242 public removeSpecFile ( specPath : string ) : void {
243243 const normalizedPath = normalizePath ( specPath )
244- const fileId = this . getTestFileId ( this . _wdioConfigTestItem , normalizedPath )
245- this . removeSpecFileById ( fileId , specPath )
244+ const fileId = this . _getTestFileId ( this . _wdioConfigTestItem , normalizedPath )
245+ this . _removeSpecFileById ( fileId , specPath )
246246 }
247247
248- private removeSpecFileById ( fileId : string , _specPath ?: string ) : void {
248+ private _removeSpecFileById ( fileId : string , _specPath ?: string ) : void {
249249 const specPath = _specPath ? _specPath : fileId . split ( TEST_ID_SEPARATOR ) [ 2 ]
250250 // Get the TestItem for this spec file
251251 const fileItem = this . _fileMap . get ( fileId )
@@ -266,7 +266,7 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
266266 /**
267267 * Convert spec paths from WebdriverIO config to file system paths
268268 */
269- private convertPathString ( specs : ( string | string [ ] ) [ ] ) {
269+ private _convertPathString ( specs : ( string | string [ ] ) [ ] ) {
270270 return specs . flatMap ( ( spec ) => ( Array . isArray ( spec ) ? spec . map ( ( path ) => path ) : [ spec ] ) )
271271 }
272272
@@ -276,7 +276,7 @@ export class TestRepository extends WorkerMiddleware implements ITestRepository
276276 * @param uri Spec file URI
277277 * @returns TestItem for the spec file
278278 */
279- private resisterSpecFile ( id : string , uri : vscode . Uri ) {
279+ private _resisterSpecFile ( id : string , uri : vscode . Uri ) {
280280 log . trace ( `[repository] spec file was registered: ${ id } ` )
281281 const fileTestItem = this . controller . createTestItem ( id , path . basename ( uri . fsPath ) , uri )
282282 fileTestItem . sortText = uri . fsPath
0 commit comments