From 5e628d7fc60d0a1a1ea9edd27f3a12f92bd9bea9 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sat, 2 Sep 2023 09:11:15 -0700 Subject: [PATCH] Use arrow functions --- test/playwright/CharWidth.test.ts | 2 +- test/playwright/InputHandler.test.ts | 2 +- test/playwright/MouseTracking.test.ts | 4 ++-- test/playwright/Parser.test.ts | 2 +- test/playwright/Terminal.test.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/playwright/CharWidth.test.ts b/test/playwright/CharWidth.test.ts index fbc06697..5325f4ef 100644 --- a/test/playwright/CharWidth.test.ts +++ b/test/playwright/CharWidth.test.ts @@ -15,7 +15,7 @@ test.afterAll(async () => await ctx.page.close()); test.beforeEach(async () => await ctx.proxy.reset()); -test.describe('CharWidth Integration Tests', function(): void { +test.describe('CharWidth Integration Tests', () => { test.describe('getStringCellWidth', () => { test('ASCII chars', async () => { await ctx.proxy.write('This is just ASCII text.#'); diff --git a/test/playwright/InputHandler.test.ts b/test/playwright/InputHandler.test.ts index 42b2916a..e422bd1c 100644 --- a/test/playwright/InputHandler.test.ts +++ b/test/playwright/InputHandler.test.ts @@ -15,7 +15,7 @@ test.beforeAll(async ({ browser }) => { test.afterAll(async () => await ctx.page.close()); -test.describe('InputHandler Integration Tests', function (): void { +test.describe('InputHandler Integration Tests', () => { test.describe('CSI', () => { test.beforeEach(async () => await ctx.proxy.reset()); diff --git a/test/playwright/MouseTracking.test.ts b/test/playwright/MouseTracking.test.ts index ba96a4e6..dbce55cd 100644 --- a/test/playwright/MouseTracking.test.ts +++ b/test/playwright/MouseTracking.test.ts @@ -164,8 +164,8 @@ function parseReport(encoding: string, msg: number[]): { state: any, row: number } } -test.describe('Mouse Tracking Tests', function (): void { - test.beforeAll(async function(): Promise { +test.describe('Mouse Tracking Tests', () => { + test.beforeAll(async () => { await ctx.page.setViewportSize({ width, height }); // patch terminal to get the onData calls // we encode the msg here to an array of codes to not lose bytes diff --git a/test/playwright/Parser.test.ts b/test/playwright/Parser.test.ts index 02e0c4b4..42406270 100644 --- a/test/playwright/Parser.test.ts +++ b/test/playwright/Parser.test.ts @@ -26,7 +26,7 @@ declare global { } } -test.describe('Parser Integration Tests', function (): void { +test.describe('Parser Integration Tests', () => { test.beforeEach(async () => await ctx.proxy.reset()); test.afterEach(async () => { await ctx.page.evaluate(() => { diff --git a/test/playwright/Terminal.test.ts b/test/playwright/Terminal.test.ts index 9bb0148f..3a4e00f0 100644 --- a/test/playwright/Terminal.test.ts +++ b/test/playwright/Terminal.test.ts @@ -378,7 +378,7 @@ test.describe('API Integration Tests', () => { await pollFor(ctx.page, `window.callCount`, 2); }); - test('onRender', async function(): Promise { + test('onRender', async () => { await openTerminal(ctx); await timeout(20); // Ensure all init events are fired await ctx.page.evaluate(`