Skip to content

Commit cac3b06

Browse files
committed
fix(test): align --no-input write assertion to new error message
Commit be8188b ("fix: harden TTY and output-discipline across CLI surface") rewrote the --interactive-in-non-TTY error message from "not supported in non-interactive mode" to the more actionable "--interactive requires an interactive terminal. Run without --interactive in CI or non-TTY environments, or pipe input via stdin." The unit test in tests/unit/register-write.test.ts was updated in that commit, but the e2e and integration tests were missed. Both assert on the write --interactive --no-input failure path. Match on the stable fragment "requires an interactive terminal" rather than the full sentence, for drift resilience against future wording tweaks. The adjacent init assertions keep their "not supported in non-interactive mode" phrasing — that message still applies to register-init.ts:25 and is unchanged.
1 parent 7d6ba8f commit cac3b06

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/e2e/cli-no-input.e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('--no-input E2E', () => {
4444
execSync('deepl --no-input write "test" --interactive', { encoding: 'utf-8', stdio: 'pipe' });
4545
} catch (error: any) {
4646
expect(error.status).toBe(6);
47-
expect(error.stderr.toString()).toContain('not supported in non-interactive mode');
47+
expect(error.stderr.toString()).toContain('requires an interactive terminal');
4848
}
4949
});
5050
});

tests/integration/cli-no-input.integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('--no-input flag', () => {
3232
const result = runCLIExpectError('deepl --no-input write "test text" --interactive');
3333

3434
expect(result.status).toBe(6);
35-
expect(result.output).toContain('not supported in non-interactive mode');
35+
expect(result.output).toContain('requires an interactive terminal');
3636
});
3737
});
3838

0 commit comments

Comments
 (0)