diff options
| author | 2023-09-15 06:53:39 -0700 | |
|---|---|---|
| committer | 2023-09-15 06:53:39 -0700 | |
| commit | a39b0d86a046f7df28af6d4a4b6d45e062c3cd74 (patch) | |
| tree | 3d243e9aec892821ad0d85cf4a8b846dffd005a7 /test/js | |
| parent | 6cc5872765e55650bba59cf178dd83e83535dd0b (diff) | |
| download | bun-a39b0d86a046f7df28af6d4a4b6d45e062c3cd74.tar.gz bun-a39b0d86a046f7df28af6d4a4b6d45e062c3cd74.tar.zst bun-a39b0d86a046f7df28af6d4a4b6d45e062c3cd74.zip | |
Fixes #5465 (#5468)
* Fixes #5465
Fixes #5465
* Update tty.js
* Update InternalModuleRegistryConstants.h
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'test/js')
| -rw-r--r-- | test/js/node/tt.y.test.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/js/node/tt.y.test.ts b/test/js/node/tt.y.test.ts new file mode 100644 index 000000000..c1723ad48 --- /dev/null +++ b/test/js/node/tt.y.test.ts @@ -0,0 +1,25 @@ +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); + }); +}); |
