Skip to content

Commit b223193

Browse files
DavertMikclaude
andcommitted
fix: prefer global.codecept_dir over store._codeceptDir in getter
When unit tests set global.codecept_dir directly (without calling store.initialize()), the getter must pick up the global value even if _codeceptDir was set by a prior test in the same process. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0daf6a8 commit b223193

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/store.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ const store = {
1111
_outputDir: null,
1212

1313
get codeceptDir() {
14-
return this._codeceptDir || global.codecept_dir || null
14+
return global.codecept_dir || this._codeceptDir || null
1515
},
1616
set codeceptDir(val) {
1717
this._codeceptDir = val
1818
},
1919

2020
get outputDir() {
21-
return this._outputDir || global.output_dir || null
21+
return global.output_dir || this._outputDir || null
2222
},
2323
set outputDir(val) {
2424
this._outputDir = val

0 commit comments

Comments
 (0)