mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix(node): make process.stdout.isTTY
writable (#26130)
Fixes https://github.com/denoland/deno/issues/26123
This commit is contained in:
parent
94b588ce66
commit
9117a9a43c
2 changed files with 19 additions and 1 deletions
|
@ -691,6 +691,16 @@ Deno.test({
|
|||
assertStrictEquals(process.stdout.clearLine, undefined);
|
||||
assertStrictEquals(process.stdout.clearScreenDown, undefined);
|
||||
}
|
||||
|
||||
// Allows overwriting `process.stdout.isTTY`
|
||||
// https://github.com/denoland/deno/issues/26123
|
||||
const original = process.stdout.isTTY;
|
||||
try {
|
||||
process.stdout.isTTY = !isTTY;
|
||||
assertEquals(process.stdout.isTTY, !isTTY);
|
||||
} finally {
|
||||
process.stdout.isTTY = original;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue