test(git): pin gitNonInteractiveEnv()'s locale so a revert fails in CI

CI runs in an English locale, where git already answers in English, so the
real-git clone tests stay green even if the LC_ALL/LANG pin from the previous
commit is dropped. A pure assertion on the env is the only check that fails
then. It also covers LANGUAGE, which gettext ignores once LC_ALL is C.

Refs #568

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-10-09 17:50:07 +02:00
parent 6ba311f38d
commit abc8598100
+8
View File
@@ -239,6 +239,14 @@ describe('gitNonInteractiveEnv', () => {
it("does not override a user's own GIT_SSH_COMMAND", () => {
expect(gitNonInteractiveEnv({ GIT_SSH_COMMAND: 'ssh -F /custom' }).GIT_SSH_COMMAND).toBe('ssh -F /custom');
});
// Issue #568. CI runs in an English locale, so the real-git tests below cannot
// catch a revert: only this assertion fails if the pin is dropped.
it("pins git's messages to English over the host's locale, since classifyGitFailure() matches English stderr", () => {
const env = gitNonInteractiveEnv({ LC_ALL: 'de_DE.UTF-8', LANG: 'de_DE.UTF-8', LANGUAGE: 'de' });
expect(env.LC_ALL).toBe('C');
expect(env.LANG).toBe('C');
});
});
describe('parseLsRemoteOutput', () => {