From faed3e7c802a83f1f89f4128e25bab939ca97dc9 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 7 Jul 2024 09:06:26 -0700 Subject: [PATCH] Move playwright tests to use project references --- .github/workflows/ci.yml | 13 ++++++ CONTRIBUTING.md | 2 +- addons/addon-attach/test/AttachAddon.test.ts | 2 +- addons/addon-attach/test/tsconfig.json | 6 ++- .../addon-canvas/test/CanvasRenderer.test.ts | 4 +- addons/addon-canvas/test/tsconfig.json | 7 ++-- .../test/ClipboardAddon.test.ts | 2 +- addons/addon-clipboard/test/tsconfig.json | 6 ++- addons/addon-fit/test/FitAddon.test.ts | 2 +- addons/addon-fit/test/tsconfig.json | 6 ++- addons/addon-image/test/ImageAddon.test.ts | 2 +- addons/addon-image/test/tsconfig.json | 6 ++- addons/addon-search/test/SearchAddon.test.ts | 2 +- addons/addon-search/test/tsconfig.json | 6 ++- .../test/SerializeAddon.test.ts | 2 +- addons/addon-serialize/test/tsconfig.json | 6 ++- .../test/UnicodeGraphemesAddon.test.ts | 2 +- .../test/tsconfig.json | 6 ++- .../test/Unicode11Addon.test.ts | 2 +- addons/addon-unicode11/test/tsconfig.json | 6 ++- .../test/WebLinksAddon.test.ts | 2 +- addons/addon-web-links/test/tsconfig.json | 6 ++- addons/addon-webgl/test/WebglRenderer.test.ts | 4 +- addons/addon-webgl/test/tsconfig.json | 7 ++-- bin/esbuild.mjs | 41 ++++++++++--------- bin/test_playwright.js | 6 +-- test/playwright/SharedRendererTests.ts | 2 +- test/playwright/tsconfig.json | 1 + 28 files changed, 97 insertions(+), 62 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d836c1d..978f192f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,54 +29,67 @@ jobs: ./lib/* \ ./out/* \ ./out-esbuild/* \ + ./out-esbuild-test/* \ ./out-test/* \ ./addons/addon-attach/lib/* \ ./addons/addon-attach/out/* \ ./addons/addon-attach/out-esbuild/* \ + ./addons/addon-attach/out-esbuild-test/* \ ./addons/addon-attach/out-test/* \ ./addons/addon-canvas/lib/* \ ./addons/addon-canvas/out/* \ ./addons/addon-canvas/out-esbuild/* \ + ./addons/addon-canvas/out-esbuild-test/* \ ./addons/addon-canvas/out-test/* \ ./addons/addon-clipboard/lib/* \ ./addons/addon-clipboard/out/* \ ./addons/addon-clipboard/out-esbuild/* \ + ./addons/addon-clipboard/out-esbuild-test/* \ ./addons/addon-clipboard/out-test/* \ ./addons/addon-fit/lib/* \ ./addons/addon-fit/out/* \ ./addons/addon-fit/out-esbuild/* \ + ./addons/addon-fit/out-esbuild-test/* \ ./addons/addon-fit/out-test/* \ ./addons/addon-image/lib/* \ ./addons/addon-image/out/* \ ./addons/addon-image/out-esbuild/* \ + ./addons/addon-image/out-esbuild-test/* \ ./addons/addon-image/out-test/* \ ./addons/addon-ligatures/lib/* \ ./addons/addon-ligatures/out/* \ ./addons/addon-ligatures/out-esbuild/* \ + ./addons/addon-ligatures/out-esbuild-test/* \ ./addons/addon-ligatures/out-test/* \ ./addons/addon-search/lib/* \ ./addons/addon-search/out/* \ ./addons/addon-search/out-esbuild/* \ + ./addons/addon-search/out-esbuild-test/* \ ./addons/addon-search/out-test/* \ ./addons/addon-serialize/lib/* \ ./addons/addon-serialize/out/* \ ./addons/addon-serialize/out-esbuild/* \ + ./addons/addon-serialize/out-esbuild-test/* \ ./addons/addon-serialize/out-test/* \ ./addons/addon-unicode11/lib/* \ ./addons/addon-unicode11/out/* \ ./addons/addon-unicode11/out-esbuild/* \ + ./addons/addon-unicode11/out-esbuild-test/* \ ./addons/addon-unicode11/out-test/* \ ./addons/addon-unicode-graphemes/lib/* \ ./addons/addon-unicode-graphemes/out/* \ ./addons/addon-unicode-graphemes/out-esbuild/* \ + ./addons/addon-unicode-graphemes/out-esbuild-test/* \ ./addons/addon-unicode-graphemes/out-test/* \ ./addons/addon-web-links/lib/* \ ./addons/addon-web-links/out/* \ ./addons/addon-web-links/out-esbuild/* \ + ./addons/addon-web-links/out-esbuild-test/* \ ./addons/addon-web-links/out-test/* \ ./addons/addon-webgl/lib/* \ ./addons/addon-webgl/out/* \ ./addons/addon-webgl/out-esbuild/* \ + ./addons/addon-webgl/out-esbuild-test/* \ ./addons/addon-webgl/out-test/* - name: Upload artifacts uses: actions/upload-artifact@v3 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6c1633dd..1fffbab1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,4 +101,4 @@ yarn test-integration --suite=core yarn test-integration --suite=addon-search ``` -These use `@playwright/test` to run all tests within the tsc test output (`out-test/`). These do not use the esbuild output because they require declaration files to get types to work. +These use `@playwright/test` to run all tests within the esbuild test output (`out-esbuild-test/`). diff --git a/addons/addon-attach/test/AttachAddon.test.ts b/addons/addon-attach/test/AttachAddon.test.ts index efb64e6f..b49d9f33 100644 --- a/addons/addon-attach/test/AttachAddon.test.ts +++ b/addons/addon-attach/test/AttachAddon.test.ts @@ -6,7 +6,7 @@ import WebSocket = require('ws'); import test from '@playwright/test'; -import { ITestContext, createTestContext, openTerminal, pollFor, timeout } from '../../../out-test/playwright/TestUtils'; +import { ITestContext, createTestContext, openTerminal, pollFor, timeout } from '../../../test/playwright/TestUtils'; let ctx: ITestContext; test.beforeAll(async ({ browser }) => { diff --git a/addons/addon-attach/test/tsconfig.json b/addons/addon-attach/test/tsconfig.json index 5f0d9f6c..cff27705 100644 --- a/addons/addon-attach/test/tsconfig.json +++ b/addons/addon-attach/test/tsconfig.json @@ -20,8 +20,7 @@ }, "strict": true, "types": [ - "../../../node_modules/@types/node", - "../../../out-test/playwright/TestUtils" + "../../../node_modules/@types/node" ] }, "include": [ @@ -34,6 +33,9 @@ }, { "path": "../../../src/browser" + }, + { + "path": "../../../test/playwright" } ] } diff --git a/addons/addon-canvas/test/CanvasRenderer.test.ts b/addons/addon-canvas/test/CanvasRenderer.test.ts index c8b35c7a..099b62ec 100644 --- a/addons/addon-canvas/test/CanvasRenderer.test.ts +++ b/addons/addon-canvas/test/CanvasRenderer.test.ts @@ -4,8 +4,8 @@ */ import test from '@playwright/test'; -import { ISharedRendererTestContext, injectSharedRendererTests, injectSharedRendererTestsStandalone } from '../../../out-test/playwright/SharedRendererTests'; -import { ITestContext, createTestContext, openTerminal } from '../../../out-test/playwright/TestUtils'; +import { ISharedRendererTestContext, injectSharedRendererTests, injectSharedRendererTestsStandalone } from '../../../test/playwright/SharedRendererTests'; +import { ITestContext, createTestContext, openTerminal } from '../../../test/playwright/TestUtils'; let ctx: ITestContext; const ctxWrapper: ISharedRendererTestContext = { diff --git a/addons/addon-canvas/test/tsconfig.json b/addons/addon-canvas/test/tsconfig.json index f73f1014..6efb7073 100644 --- a/addons/addon-canvas/test/tsconfig.json +++ b/addons/addon-canvas/test/tsconfig.json @@ -21,9 +21,7 @@ "strict": true, "types": [ "../../../node_modules/@types/node", - "../../../node_modules/@lunapaint/png-codec", - "../../../out-test/playwright/TestUtils", - "../../../out-test/playwright/SharedRendererTests" + "../../../node_modules/@lunapaint/png-codec" ] }, "include": [ @@ -36,6 +34,9 @@ }, { "path": "../../../src/browser" + }, + { + "path": "../../../test/playwright" } ] } diff --git a/addons/addon-clipboard/test/ClipboardAddon.test.ts b/addons/addon-clipboard/test/ClipboardAddon.test.ts index 6234a3cd..d4d86d46 100644 --- a/addons/addon-clipboard/test/ClipboardAddon.test.ts +++ b/addons/addon-clipboard/test/ClipboardAddon.test.ts @@ -5,7 +5,7 @@ import test from '@playwright/test'; import { deepEqual, ok, strictEqual } from 'assert'; -import { ITestContext, createTestContext, launchBrowser, openTerminal, timeout } from '../../../out-test/playwright/TestUtils'; +import { ITestContext, createTestContext, launchBrowser, openTerminal, timeout } from '../../../test/playwright/TestUtils'; let ctx: ITestContext; test.beforeAll(async ({ browser }, testInfo) => { diff --git a/addons/addon-clipboard/test/tsconfig.json b/addons/addon-clipboard/test/tsconfig.json index 5f0d9f6c..cff27705 100644 --- a/addons/addon-clipboard/test/tsconfig.json +++ b/addons/addon-clipboard/test/tsconfig.json @@ -20,8 +20,7 @@ }, "strict": true, "types": [ - "../../../node_modules/@types/node", - "../../../out-test/playwright/TestUtils" + "../../../node_modules/@types/node" ] }, "include": [ @@ -34,6 +33,9 @@ }, { "path": "../../../src/browser" + }, + { + "path": "../../../test/playwright" } ] } diff --git a/addons/addon-fit/test/FitAddon.test.ts b/addons/addon-fit/test/FitAddon.test.ts index f780e2f5..a8a2d8bb 100644 --- a/addons/addon-fit/test/FitAddon.test.ts +++ b/addons/addon-fit/test/FitAddon.test.ts @@ -5,7 +5,7 @@ import test from '@playwright/test'; import { deepEqual, ok, strictEqual } from 'assert'; -import { ITestContext, createTestContext, openTerminal, timeout } from '../../../out-test/playwright/TestUtils'; +import { ITestContext, createTestContext, openTerminal, timeout } from '../../../test/playwright/TestUtils'; let ctx: ITestContext; test.beforeAll(async ({ browser }) => { diff --git a/addons/addon-fit/test/tsconfig.json b/addons/addon-fit/test/tsconfig.json index 5f0d9f6c..cff27705 100644 --- a/addons/addon-fit/test/tsconfig.json +++ b/addons/addon-fit/test/tsconfig.json @@ -20,8 +20,7 @@ }, "strict": true, "types": [ - "../../../node_modules/@types/node", - "../../../out-test/playwright/TestUtils" + "../../../node_modules/@types/node" ] }, "include": [ @@ -34,6 +33,9 @@ }, { "path": "../../../src/browser" + }, + { + "path": "../../../test/playwright" } ] } diff --git a/addons/addon-image/test/ImageAddon.test.ts b/addons/addon-image/test/ImageAddon.test.ts index 54ea635a..758a19a4 100644 --- a/addons/addon-image/test/ImageAddon.test.ts +++ b/addons/addon-image/test/ImageAddon.test.ts @@ -6,7 +6,7 @@ import test from '@playwright/test'; import { readFileSync } from 'fs'; import { FINALIZER, introducer, sixelEncode } from 'sixel'; -import { ITestContext, createTestContext, openTerminal, pollFor } from '../../../out-test/playwright/TestUtils'; +import { ITestContext, createTestContext, openTerminal, pollFor } from '../../../test/playwright/TestUtils'; import { deepStrictEqual, ok, strictEqual } from 'assert'; /** diff --git a/addons/addon-image/test/tsconfig.json b/addons/addon-image/test/tsconfig.json index 5f0d9f6c..cff27705 100644 --- a/addons/addon-image/test/tsconfig.json +++ b/addons/addon-image/test/tsconfig.json @@ -20,8 +20,7 @@ }, "strict": true, "types": [ - "../../../node_modules/@types/node", - "../../../out-test/playwright/TestUtils" + "../../../node_modules/@types/node" ] }, "include": [ @@ -34,6 +33,9 @@ }, { "path": "../../../src/browser" + }, + { + "path": "../../../test/playwright" } ] } diff --git a/addons/addon-search/test/SearchAddon.test.ts b/addons/addon-search/test/SearchAddon.test.ts index dbcb0738..0045cf1c 100644 --- a/addons/addon-search/test/SearchAddon.test.ts +++ b/addons/addon-search/test/SearchAddon.test.ts @@ -7,7 +7,7 @@ import test from '@playwright/test'; import { deepStrictEqual, strictEqual } from 'assert'; import { readFile } from 'fs'; import { resolve } from 'path'; -import { ITestContext, createTestContext, openTerminal, timeout } from '../../../out-test/playwright/TestUtils'; +import { ITestContext, createTestContext, openTerminal, timeout } from '../../../test/playwright/TestUtils'; let ctx: ITestContext; test.beforeAll(async ({ browser }) => { diff --git a/addons/addon-search/test/tsconfig.json b/addons/addon-search/test/tsconfig.json index 5f0d9f6c..cff27705 100644 --- a/addons/addon-search/test/tsconfig.json +++ b/addons/addon-search/test/tsconfig.json @@ -20,8 +20,7 @@ }, "strict": true, "types": [ - "../../../node_modules/@types/node", - "../../../out-test/playwright/TestUtils" + "../../../node_modules/@types/node" ] }, "include": [ @@ -34,6 +33,9 @@ }, { "path": "../../../src/browser" + }, + { + "path": "../../../test/playwright" } ] } diff --git a/addons/addon-serialize/test/SerializeAddon.test.ts b/addons/addon-serialize/test/SerializeAddon.test.ts index 30ff6002..cf00b391 100644 --- a/addons/addon-serialize/test/SerializeAddon.test.ts +++ b/addons/addon-serialize/test/SerializeAddon.test.ts @@ -7,7 +7,7 @@ import test from '@playwright/test'; import { deepStrictEqual, notDeepStrictEqual, strictEqual } from 'assert'; import { readFile } from 'fs'; import { resolve } from 'path'; -import { ITestContext, createTestContext, openTerminal, timeout, writeSync } from '../../../out-test/playwright/TestUtils'; +import { ITestContext, createTestContext, openTerminal, timeout, writeSync } from '../../../test/playwright/TestUtils'; const writeRawSync = (page: any, str: string): Promise => writeSync(ctx.page, `' +` + JSON.stringify(str) + `+ '`); diff --git a/addons/addon-serialize/test/tsconfig.json b/addons/addon-serialize/test/tsconfig.json index 5f0d9f6c..cff27705 100644 --- a/addons/addon-serialize/test/tsconfig.json +++ b/addons/addon-serialize/test/tsconfig.json @@ -20,8 +20,7 @@ }, "strict": true, "types": [ - "../../../node_modules/@types/node", - "../../../out-test/playwright/TestUtils" + "../../../node_modules/@types/node" ] }, "include": [ @@ -34,6 +33,9 @@ }, { "path": "../../../src/browser" + }, + { + "path": "../../../test/playwright" } ] } diff --git a/addons/addon-unicode-graphemes/test/UnicodeGraphemesAddon.test.ts b/addons/addon-unicode-graphemes/test/UnicodeGraphemesAddon.test.ts index 9bf272ef..258e3668 100644 --- a/addons/addon-unicode-graphemes/test/UnicodeGraphemesAddon.test.ts +++ b/addons/addon-unicode-graphemes/test/UnicodeGraphemesAddon.test.ts @@ -5,7 +5,7 @@ import test from '@playwright/test'; import { deepStrictEqual, strictEqual } from 'assert'; -import { ITestContext, createTestContext, openTerminal } from '../../../out-test/playwright/TestUtils'; +import { ITestContext, createTestContext, openTerminal } from '../../../test/playwright/TestUtils'; let ctx: ITestContext; test.beforeAll(async ({ browser }) => { diff --git a/addons/addon-unicode-graphemes/test/tsconfig.json b/addons/addon-unicode-graphemes/test/tsconfig.json index 5f0d9f6c..cff27705 100644 --- a/addons/addon-unicode-graphemes/test/tsconfig.json +++ b/addons/addon-unicode-graphemes/test/tsconfig.json @@ -20,8 +20,7 @@ }, "strict": true, "types": [ - "../../../node_modules/@types/node", - "../../../out-test/playwright/TestUtils" + "../../../node_modules/@types/node" ] }, "include": [ @@ -34,6 +33,9 @@ }, { "path": "../../../src/browser" + }, + { + "path": "../../../test/playwright" } ] } diff --git a/addons/addon-unicode11/test/Unicode11Addon.test.ts b/addons/addon-unicode11/test/Unicode11Addon.test.ts index 4e941c34..a0f1dc49 100644 --- a/addons/addon-unicode11/test/Unicode11Addon.test.ts +++ b/addons/addon-unicode11/test/Unicode11Addon.test.ts @@ -5,7 +5,7 @@ import test from '@playwright/test'; import { deepStrictEqual } from 'assert'; -import { ITestContext, createTestContext, openTerminal } from '../../../out-test/playwright/TestUtils'; +import { ITestContext, createTestContext, openTerminal } from '../../../test/playwright/TestUtils'; let ctx: ITestContext; test.beforeAll(async ({ browser }) => { diff --git a/addons/addon-unicode11/test/tsconfig.json b/addons/addon-unicode11/test/tsconfig.json index 5f0d9f6c..cff27705 100644 --- a/addons/addon-unicode11/test/tsconfig.json +++ b/addons/addon-unicode11/test/tsconfig.json @@ -20,8 +20,7 @@ }, "strict": true, "types": [ - "../../../node_modules/@types/node", - "../../../out-test/playwright/TestUtils" + "../../../node_modules/@types/node" ] }, "include": [ @@ -34,6 +33,9 @@ }, { "path": "../../../src/browser" + }, + { + "path": "../../../test/playwright" } ] } diff --git a/addons/addon-web-links/test/WebLinksAddon.test.ts b/addons/addon-web-links/test/WebLinksAddon.test.ts index abad5150..8682c533 100644 --- a/addons/addon-web-links/test/WebLinksAddon.test.ts +++ b/addons/addon-web-links/test/WebLinksAddon.test.ts @@ -6,7 +6,7 @@ import test from '@playwright/test'; import { deepStrictEqual, strictEqual } from 'assert'; import { readFile } from 'fs'; import { resolve } from 'path'; -import { ITestContext, createTestContext, openTerminal, pollFor, timeout } from '../../../out-test/playwright/TestUtils'; +import { ITestContext, createTestContext, openTerminal, pollFor, timeout } from '../../../test/playwright/TestUtils'; interface ILinkStateData { uri?: string; diff --git a/addons/addon-web-links/test/tsconfig.json b/addons/addon-web-links/test/tsconfig.json index 0c61a31e..120fccdc 100644 --- a/addons/addon-web-links/test/tsconfig.json +++ b/addons/addon-web-links/test/tsconfig.json @@ -21,8 +21,7 @@ }, "strict": true, "types": [ - "../../../node_modules/@types/node", - "../../../out-test/playwright/TestUtils" + "../../../node_modules/@types/node" ] }, "include": [ @@ -35,6 +34,9 @@ }, { "path": "../../../src/browser" + }, + { + "path": "../../../test/playwright" } ] } diff --git a/addons/addon-webgl/test/WebglRenderer.test.ts b/addons/addon-webgl/test/WebglRenderer.test.ts index d5f62fda..af61992c 100644 --- a/addons/addon-webgl/test/WebglRenderer.test.ts +++ b/addons/addon-webgl/test/WebglRenderer.test.ts @@ -4,8 +4,8 @@ */ import test from '@playwright/test'; -import { ISharedRendererTestContext, injectSharedRendererTests, injectSharedRendererTestsStandalone } from '../../../out-test/playwright/SharedRendererTests'; -import { ITestContext, createTestContext, openTerminal } from '../../../out-test/playwright/TestUtils'; +import { ISharedRendererTestContext, injectSharedRendererTests, injectSharedRendererTestsStandalone } from '../../../test/playwright/SharedRendererTests'; +import { ITestContext, createTestContext, openTerminal } from '../../../test/playwright/TestUtils'; import { platform } from 'os'; let ctx: ITestContext; diff --git a/addons/addon-webgl/test/tsconfig.json b/addons/addon-webgl/test/tsconfig.json index 7ff5f6c1..c602c462 100644 --- a/addons/addon-webgl/test/tsconfig.json +++ b/addons/addon-webgl/test/tsconfig.json @@ -21,9 +21,7 @@ "strict": true, "types": [ "../../../node_modules/@types/node", - "../../../node_modules/@lunapaint/png-codec", - "../../../out-test/playwright/TestUtils", - "../../../out-test/playwright/SharedRendererTests" + "../../../node_modules/@lunapaint/png-codec" ] }, "include": [ @@ -36,6 +34,9 @@ }, { "path": "../../../src/browser" + }, + { + "path": "../../../test/playwright" } ] } diff --git a/bin/esbuild.mjs b/bin/esbuild.mjs index 724c2ca1..f056e30d 100644 --- a/bin/esbuild.mjs +++ b/bin/esbuild.mjs @@ -92,10 +92,10 @@ let outConfig = { let skipOut = false; /** @type {esbuild.BuildOptions} */ -// let outTestConfig = { -// format: 'cjs' -// } -// let skipOutTest = false; +let outTestConfig = { + format: 'cjs' +} +let skipOutTest = false; if (config.addon) { bundleConfig = { @@ -108,14 +108,15 @@ if (config.addon) { entryPoints: [`addons/addon-${config.addon}/src/**/*.ts`], outdir: `addons/addon-${config.addon}/out-esbuild/` }; - // outTestConfig = { - // ...outConfig, - // entryPoints: [`addons/addon-${config.addon}/test/**/*.ts`], - // outdir: `addons/addon-${config.addon}/out-esbuild-test/` - // }; + outTestConfig = { + ...outConfig, + entryPoints: [`addons/addon-${config.addon}/test/**/*.ts`], + outdir: `addons/addon-${config.addon}/out-esbuild-test/` + }; if (config.addon === 'ligatures') { bundleConfig.platform = 'node'; + skipOutTest = true; } if (config.addon === 'serialize') { @@ -173,11 +174,11 @@ if (config.addon) { entryPoints: ['src/**/*.ts'], outdir: 'out-esbuild/' }; - // outTestConfig = { - // ...outConfig, - // entryPoints: ['test/**/*.ts'], - // outdir: 'out-esbuild-test/' - // }; + outTestConfig = { + ...outConfig, + entryPoints: ['test/**/*.ts'], + outdir: 'out-esbuild-test/' + }; } if (config.isWatch) { @@ -185,15 +186,15 @@ if (config.isWatch) { if (!skipOut) { context(outConfig).then(e => e.watch()); } - // if (!skipOutTest) { - // context(outTestConfig).then(e => e.watch()); - // } + if (!skipOutTest) { + context(outTestConfig).then(e => e.watch()); + } } else { await build(bundleConfig); if (!skipOut) { await build(outConfig); } - // if (!skipOutTest) { - // await build(outTestConfig); - // } + if (!skipOutTest) { + await build(outTestConfig); + } } diff --git a/bin/test_playwright.js b/bin/test_playwright.js index 7536ff0d..2964693c 100644 --- a/bin/test_playwright.js +++ b/bin/test_playwright.js @@ -18,7 +18,7 @@ while (argv.some(e => e.startsWith('--suite='))) { } let configs = [ - { name: 'core', path: 'out-test/playwright/playwright.config.js' } + { name: 'core', path: 'out-esbuild-test/playwright/playwright.config.js' } ]; const addons = [ 'attach', @@ -34,7 +34,7 @@ const addons = [ 'webgl', ]; for (const addon of addons) { - configs.push({ name: `addon-${addon}`, path: `addons/addon-${addon}/out-test/playwright.config.js` }); + configs.push({ name: `addon-${addon}`, path: `addons/addon-${addon}/out-esbuild-test/playwright.config.js` }); } if (suiteFilter) { @@ -61,8 +61,8 @@ async function run() { if (run.error) { console.error(run.error); + process.exit(run.status ?? -1); } - process.exit(run.status ?? -1); } } run(); diff --git a/test/playwright/SharedRendererTests.ts b/test/playwright/SharedRendererTests.ts index 68492b3d..4a1798ce 100644 --- a/test/playwright/SharedRendererTests.ts +++ b/test/playwright/SharedRendererTests.ts @@ -1313,7 +1313,7 @@ function getCellColor(ctx: ITestContext, col: number, row: number, position: Cel let frameDetails: { cols: number, rows: number, decoded: IImage32 } | undefined = undefined; async function getFrameDetails(ctx: ITestContext): Promise<{ cols: number, rows: number, decoded: IImage32 }> { - const screenshotOptions: LocatorScreenshotOptions | undefined = process.env.DEBUG ? { path: 'out-test/playwright/screenshot.png' } : undefined; + const screenshotOptions: LocatorScreenshotOptions | undefined = process.env.DEBUG ? { path: 'out-esbuild-test/playwright/screenshot.png' } : undefined; const buffer = await ctx.page.locator('#terminal-container .xterm-screen').screenshot(screenshotOptions); frameDetails = { cols: await ctx.proxy.cols, diff --git a/test/playwright/tsconfig.json b/test/playwright/tsconfig.json index 9857ff0d..255e6eb0 100644 --- a/test/playwright/tsconfig.json +++ b/test/playwright/tsconfig.json @@ -26,6 +26,7 @@ }, "target": "ESNext", "module": "commonjs", + "composite": true }, "include": [ "./**/*",