Skip to content

Commit c97670b

Browse files
skulidropekclaude
andcommitted
fix(test): rewrite setRawMode stub as arrow function to avoid this outside class
Replace the named function with this-parameter with an arrow function that returns process.stdin directly — no eslint-disable needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
1 parent 0121b9e commit c97670b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

packages/app/tests/docker-git/menu-shared.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ const restoreTerminalBindings = (): void => {
4949
}
5050

5151
const createRawModeStub = (events: Array<string>): typeof process.stdin.setRawMode =>
52-
// eslint-disable-next-line unicorn/no-this-outside-of-class
53-
function setRawModeStub(this: typeof process.stdin, enabled: boolean) {
52+
(enabled: boolean) => {
5453
events.push(`raw:${String(enabled)}`)
55-
return this
54+
return process.stdin
5655
}
5756

5857
const createWriteStub = (

0 commit comments

Comments
 (0)