diff --git a/addons/xterm-addon-webgl/test/WebglRenderer.test.ts b/addons/xterm-addon-webgl/test/WebglRenderer.test.ts index 14a9cb81..718d8e03 100644 --- a/addons/xterm-addon-webgl/test/WebglRenderer.test.ts +++ b/addons/xterm-addon-webgl/test/WebglRenderer.test.ts @@ -4,7 +4,6 @@ */ import test from '@playwright/test'; -import { strictEqual } from 'assert'; import { ISharedRendererTestContext, injectSharedRendererTests } from '../../../out-test/playwright/SharedRendererTests'; import { ITestContext, createTestContext, openTerminal } from '../../../out-test/playwright/TestUtils'; import { platform } from 'os'; diff --git a/bin/test_playwright.js b/bin/test_playwright.js index f70a1833..08ecec57 100644 --- a/bin/test_playwright.js +++ b/bin/test_playwright.js @@ -7,6 +7,7 @@ const cp = require('child_process'); const path = require('path'); +const { setTimeout } = require('timers/promises'); const configs = [ { name: 'core', path: 'out-test/playwright/playwright.config.js' }, @@ -19,17 +20,22 @@ function npmBinScript(script) { `${script}.cmd` : script)); } -for (const config of configs) { - const command = npmBinScript('playwright'); - const args = ['test', '-c', config.path, ...process.argv.slice(2)]; - console.log(`Running suite \x1b[1;34m${config.name}...\x1b[0m`); - console.log(`\n\x1b[32m${command}\x1b[0m`, args); - const run = cp.spawnSync(command, args, { - cwd: path.resolve(__dirname, '..'), - stdio: 'inherit' +async function run() { + for (const config of configs) { + const command = npmBinScript('playwright'); + const args = ['test', '-c', config.path, ...process.argv.slice(2)]; + console.log(`Running suite \x1b[1;34m${config.name}...\x1b[0m`); + console.log(`\n\x1b[32m${command}\x1b[0m`, args); + const run = cp.spawnSync(command, args, { + cwd: path.resolve(__dirname, '..'), + stdio: 'inherit' + } + ); + if (run.status) { + process.exit(run.status); } - ); - if (run.status) { - process.exit(run.status); + // Space out test runs to ensure servers don't step on each other + await setTimeout(1000); } } +run();