fix(config): normalize empty/whitespace TESTSPRITE_PROFILE to unset#233
Conversation
Walkthrough
ChangesConfiguration profile normalization
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
zeshi-du
left a comment
There was a problem hiding this comment.
Surgical fix reusing the existing normalizeEnvVar helper already applied to the sibling env vars in the same function, with the three targeted tests. The red gate check is a repo-wide CI infra issue we just fixed on main — unrelated to this PR. Thanks @0xshalah!
One-line fix: wraps env.TESTSPRITE_PROFILE with normalizeEnvVar() so an
empty/whitespace-only value is treated as unset and resolves to the "default"
profile — consistent with TESTSPRITE_API_URL and TESTSPRITE_API_KEY.
3 new unit tests added (empty, whitespace-only, blank-with-credentials).
eslint + prettier + tsc all clean locally.
Summary by CodeRabbit
Bug Fixes
Tests