mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
26 lines
626 B
TypeScript
26 lines
626 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(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(1);
|
|
});
|
|
});
|