@@ -672,7 +672,7 @@ async function createPlugins(config, options = {}) {
672672 continue
673673 }
674674
675- if ( ! options . child && process . env . RUNS_WITH_WORKERS === 'true' && ! runInParent ) {
675+ if ( ! options . child && store . workerMode && ! runInParent ) {
676676 continue
677677 }
678678 let module
@@ -681,7 +681,7 @@ async function createPlugins(config, options = {}) {
681681 module = pluginConfig . require
682682 if ( module . startsWith ( '.' ) ) {
683683 // local
684- module = path . resolve ( global . codecept_dir , module ) // custom plugin
684+ module = path . resolve ( store . codeceptDir , module ) // custom plugin
685685 }
686686 } else {
687687 module = `./plugin/${ pluginName } .js`
@@ -716,7 +716,7 @@ async function loadGherkinStepsAsync(paths) {
716716 bddModule . clearCurrentStepFile ( )
717717 }
718718 } else {
719- const folderPath = paths . startsWith ( '.' ) ? normalizeAndJoin ( global . codecept_dir , paths ) : ''
719+ const folderPath = paths . startsWith ( '.' ) ? normalizeAndJoin ( store . codeceptDir , paths ) : ''
720720 if ( folderPath !== '' ) {
721721 const files = globSync ( folderPath )
722722 for ( const file of files ) {
@@ -764,7 +764,7 @@ async function loadSupportObject(modulePath, supportObjectName) {
764764 }
765765 }
766766 if ( typeof modulePath === 'string' && modulePath . charAt ( 0 ) === '.' ) {
767- modulePath = path . join ( global . codecept_dir , modulePath )
767+ modulePath = path . join ( store . codeceptDir , modulePath )
768768 }
769769 try {
770770 // Use dynamic import for both ESM and CJS modules
@@ -888,7 +888,7 @@ async function loadTranslation(locale, vocabularies) {
888888 const langs = await Translation . getLangs ( )
889889 if ( langs [ locale ] ) {
890890 translation = new Translation ( langs [ locale ] )
891- } else if ( fileExists ( path . join ( global . codecept_dir , locale ) ) ) {
891+ } else if ( fileExists ( path . join ( store . codeceptDir , locale ) ) ) {
892892 // get from a provided file instead
893893 translation = Translation . createDefault ( )
894894 translation . loadVocabulary ( locale )
@@ -905,7 +905,7 @@ function getHelperModuleName(helperName, config) {
905905 // classical require
906906 if ( config [ helperName ] . require ) {
907907 if ( config [ helperName ] . require . startsWith ( '.' ) ) {
908- let helperPath = path . resolve ( global . codecept_dir , config [ helperName ] . require )
908+ let helperPath = path . resolve ( store . codeceptDir , config [ helperName ] . require )
909909 // Add .js extension if not present for ESM compatibility
910910 if ( ! path . extname ( helperPath ) ) {
911911 helperPath += '.js'
0 commit comments