Discord Username / User ID: shalahuddin02
What does this improvement do?:
loadConfig() normalizes empty/whitespace-only TESTSPRITE_API_URL and
TESTSPRITE_API_KEY via normalizeEnvVar() so a blank env var is treated as
unset and falls through the ?? chain. TESTSPRITE_PROFILE was missed.
A blank TESTSPRITE_PROFILE= in a shell profile currently breaks every command
with a confusing VALIDATION_ERROR because the empty string fails the INI
section-name guard. This fix applies the same normalization so a blank profile
env var resolves to "default" — consistent with the other two env vars.
Details / implementation notes:
Fix: one-line change in src/lib/config.ts — wraps env.TESTSPRITE_PROFILE with
normalizeEnvVar(), matching the existing pattern for TESTSPRITE_API_URL and
TESTSPRITE_API_KEY.
Added 3 unit tests in src/lib/config.test.ts:
- empty TESTSPRITE_PROFILE → default
- whitespace-only TESTSPRITE_PROFILE → default
- blank TESTSPRITE_PROFILE reads credentials from the default profile
Local verification: eslint clean, prettier clean, tsc --noEmit clean,
14/14 config tests passing, no regressions in full suite.
PR will follow once this issue is triaged and assigned.
- ☑ I have searched existing issues and this is not a duplicate.
- ☑ I have provided my Discord identity above for reward coordination.
Discord Username / User ID: shalahuddin02
What does this improvement do?:
loadConfig()normalizes empty/whitespace-onlyTESTSPRITE_API_URLandTESTSPRITE_API_KEYvianormalizeEnvVar()so a blank env var is treated asunset and falls through the
??chain.TESTSPRITE_PROFILEwas missed.A blank
TESTSPRITE_PROFILE=in a shell profile currently breaks every commandwith a confusing VALIDATION_ERROR because the empty string fails the INI
section-name guard. This fix applies the same normalization so a blank profile
env var resolves to "default" — consistent with the other two env vars.
Details / implementation notes:
Fix: one-line change in src/lib/config.ts — wraps env.TESTSPRITE_PROFILE with
normalizeEnvVar(), matching the existing pattern for TESTSPRITE_API_URL and
TESTSPRITE_API_KEY.
Added 3 unit tests in src/lib/config.test.ts:
Local verification: eslint clean, prettier clean, tsc --noEmit clean,
14/14 config tests passing, no regressions in full suite.
PR will follow once this issue is triaged and assigned.