mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 22:01:47 +00:00
* fix regression tests * fix fs.test.ts bigintstats * enable transpiler cache lol * remove failing * fix filesystem router * update * fix run-unicode test * update comment * add updated snapshot * fix remaining node-module-module tests * fixup * [autofix.ci] apply automated fixes * fix tty tests --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
26 lines
698 B
TypeScript
26 lines
698 B
TypeScript
import { describe, it, expect } from "bun:test";
|
|
import { WriteStream } from "node:tty";
|
|
|
|
describe("WriteStream.prototype.getColorDepth", () => {
|
|
it("iTerm ancient", () => {
|
|
expect(
|
|
WriteStream.prototype.getColorDepth.call(undefined, {
|
|
TERM_PROGRAM: "iTerm.app",
|
|
}),
|
|
).toBe(process.platform === "win32" ? 24 : 8);
|
|
});
|
|
|
|
it("iTerm modern", () => {
|
|
expect(
|
|
WriteStream.prototype.getColorDepth.call(undefined, {
|
|
TERM_PROGRAM: "iTerm.app",
|
|
TERM_PROGRAM_VERSION: 3,
|
|
}),
|
|
).toBe(24);
|
|
});
|
|
|
|
it("empty", () => {
|
|
expect(WriteStream.prototype.getColorDepth.call(undefined, {})).toBe(process.platform === "win32" ? 24 : 1);
|
|
});
|
|
});
|