From 92a1bfcf2e7f06523153a68bd2e73f7156619f7d Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 22:06:29 -0700 Subject: [PATCH 1/5] test(search): send real CSI CUP in #3834 null-char case The integration test intended to move the cursor forward with ESC [ C but wrote the literal string \x1b[C due to double escaping. Use a single-escaped '\x1b[CHi Hi' so the terminal receives the control sequence and creates the null cell the scenario describes. Co-authored-by: Cursor --- addons/addon-search/test/SearchAddon.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/addon-search/test/SearchAddon.test.ts b/addons/addon-search/test/SearchAddon.test.ts index a4ccb6c0e..89f0ff4fa 100644 --- a/addons/addon-search/test/SearchAddon.test.ts +++ b/addons/addon-search/test/SearchAddon.test.ts @@ -501,7 +501,7 @@ test.describe('Search Tests', () => { window.search.onDidChangeResults(e => window.calls.push(e)); `); // Move cursor forward 1 time to create a null character, as opposed to regular whitespace - await ctx.proxy.write('\\x1b[CHi Hi'); + await ctx.proxy.write('\x1b[CHi Hi'); strictEqual(await ctx.page.evaluate(`window.search.findPrevious('h', { decorations: { activeMatchColorOverviewRuler: '#ff0000' } })`), true); deepStrictEqual(await ctx.page.evaluate('window.calls'), [ { resultCount: 2, resultIndex: 1 } From a9a2a8e3c166a05bb13bbab0f812ca01de8f0297 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 22:28:51 -0700 Subject: [PATCH 2/5] test(search): reject readFile errors in #2444 fixture loader beforeAll always resolved the readFile promise with data even when err was set, which led to calling toString on undefined. Reject the promise on err so fixture load failures surface clearly. Use res/rej callback names to avoid shadowing path.resolve. Co-authored-by: Cursor --- addons/addon-search/test/SearchAddon.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/addon-search/test/SearchAddon.test.ts b/addons/addon-search/test/SearchAddon.test.ts index 89f0ff4fa..3438772a8 100644 --- a/addons/addon-search/test/SearchAddon.test.ts +++ b/addons/addon-search/test/SearchAddon.test.ts @@ -417,7 +417,7 @@ test.describe('Search Tests', () => { test.describe('#2444 wrapped line content not being found', () => { let fixture: string; test.beforeAll(async () => { - fixture = (await new Promise(r => readFile(resolve(__dirname, '../fixtures/issue-2444'), (err, data) => r(data)))).toString(); + fixture = (await new Promise((res, rej) => readFile(resolve(__dirname, '../fixtures/issue-2444'), (err, data) => err ? rej(err) : res(data)))).toString(); if (process.platform !== 'win32') { fixture = fixture.replace(/\n/g, '\n\r'); } From 8e7e4f16e5cf5487afdc366762ac115e1cb90108 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 22:10:27 -0700 Subject: [PATCH 3/5] test(parser): fix typo in EscapeSequenceParser test title Rename the mocha case "inital states" to "initial states". Co-authored-by: Cursor --- src/common/parser/EscapeSequenceParser.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/parser/EscapeSequenceParser.test.ts b/src/common/parser/EscapeSequenceParser.test.ts index f684da2c8..73238d039 100644 --- a/src/common/parser/EscapeSequenceParser.test.ts +++ b/src/common/parser/EscapeSequenceParser.test.ts @@ -243,7 +243,7 @@ describe('EscapeSequenceParser', () => { p = new TestEscapeSequenceParser(tansitions); assert.deepEqual(p.transitions, tansitions); }); - it('inital states', () => { + it('initial states', () => { assert.equal(parser.initialState, ParserState.GROUND); assert.equal(parser.currentState, ParserState.GROUND); assert.equal(parser.osc, ''); From 9a70816dad388d7d09ab2716d28b0a190221080b Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon, 1 Jun 2026 07:42:15 -0700 Subject: [PATCH 4/5] test(addon-attach): correct Playwright suite name in AttachAddon tests The integration test file used test.describe('Search Tests'), copied from addon-search. That mislabels attach-addon results in Playwright reports and makes the suite harder to filter or debug. Rename the block to 'AttachAddon' so the describe name matches the addon under test. No test logic changed. Validated with: npm run build && npm run esbuild, npm run test-unit, npm run esbuild-demo-client && npm run esbuild-demo-server && npm run test-integration, npm run package, npm run package-headless. Co-authored-by: Cursor --- addons/addon-attach/test/AttachAddon.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/addon-attach/test/AttachAddon.test.ts b/addons/addon-attach/test/AttachAddon.test.ts index b49d9f337..ee9b22c2e 100644 --- a/addons/addon-attach/test/AttachAddon.test.ts +++ b/addons/addon-attach/test/AttachAddon.test.ts @@ -15,7 +15,7 @@ test.beforeAll(async ({ browser }) => { }); test.afterAll(async () => await ctx.page.close()); -test.describe('Search Tests', () => { +test.describe('AttachAddon', () => { test.beforeEach(async () => { await ctx.proxy.reset(); From 096707d7363cb7085e568eecf96e7f2449a75381 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 1 Jun 2026 15:29:18 +0000 Subject: [PATCH 5/5] test: fix typos in test titles and comments Apply test-only hunks from docs typo fixes: SharedRendererTests duplicate word, SerializeAddon workaround comment, and mouse range spelling in MouseService and InputHandler tests. Co-authored-by: Daniel Imms --- addons/addon-serialize/test/SerializeAddon.test.ts | 2 +- src/browser/services/MouseService.test.ts | 2 +- src/common/InputHandler.test.ts | 2 +- test/playwright/SharedRendererTests.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/addon-serialize/test/SerializeAddon.test.ts b/addons/addon-serialize/test/SerializeAddon.test.ts index fb42d807d..c8dba3039 100644 --- a/addons/addon-serialize/test/SerializeAddon.test.ts +++ b/addons/addon-serialize/test/SerializeAddon.test.ts @@ -192,7 +192,7 @@ test.describe('SerializeAddon', () => { const cols = 10; const line = '+'.repeat(cols); const lines: string[] = [ - sgr(FG_P16_GREEN) + line, // Workaround: If we clear all flags a the end, serialize will use \x1b[0m to clear instead of the sepcific disable sequence + sgr(FG_P16_GREEN) + line, // Workaround: If we clear all flags at the end, serialize will use \x1b[0m to clear instead of the specific disable sequence sgr(INVERSE) + line, sgr(BOLD) + line, sgr(UNDERLINED) + line, diff --git a/src/browser/services/MouseService.test.ts b/src/browser/services/MouseService.test.ts index 6d760ff0a..b4655a1a1 100644 --- a/src/browser/services/MouseService.test.ts +++ b/src/browser/services/MouseService.test.ts @@ -176,7 +176,7 @@ describe('MouseService _triggerMouseEvent', () => { for (let i = 0; i < bufferService.cols; ++i) { assert.equal(trigger({ col: i, row: 0, x: 0, y: 0, button: CoreMouseButton.LEFT, action: CoreMouseAction.DOWN }), true); if (i > 222) { - // supress mouse reports if we are out of addressible range (max. 222) + // suppress mouse reports if we are out of addressable range (max. 222) assert.deepEqual(toBytes(reports.pop()), []); } else { assert.deepEqual(toBytes(reports.pop()), [0x1b, 0x5b, 0x4d, 0x20, i + 33, 0x21]); diff --git a/src/common/InputHandler.test.ts b/src/common/InputHandler.test.ts index 3cfc9e019..8f0109727 100644 --- a/src/common/InputHandler.test.ts +++ b/src/common/InputHandler.test.ts @@ -1241,7 +1241,7 @@ describe('InputHandler', () => { await inputHandler.parseP('\x1b[e'); assert.deepEqual(getCursor(bufferService), [8, 5]); }); - describe('should clamp cursor into addressible range', () => { + describe('should clamp cursor into addressable range', () => { it('CUF', async () => { bufferService.buffer.x = 10000; bufferService.buffer.y = 10000; diff --git a/test/playwright/SharedRendererTests.ts b/test/playwright/SharedRendererTests.ts index db5c4c073..1983fd410 100644 --- a/test/playwright/SharedRendererTests.ts +++ b/test/playwright/SharedRendererTests.ts @@ -980,7 +980,7 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void }); test.describe('selectionInactiveBackground', async () => { - test('should render the the inactive selection when not focused', async () => { + test('should render the inactive selection when not focused', async () => { const theme: ITheme = { selectionBackground: '#FF000080', selectionInactiveBackground: '#0000FF80'