diff --git a/test/src/headful.spec.ts b/test/src/headful.spec.ts index 69643f62f23..4049dc8a4d6 100644 --- a/test/src/headful.spec.ts +++ b/test/src/headful.spec.ts @@ -22,7 +22,7 @@ import expect from 'expect'; import {PuppeteerLaunchOptions} from 'puppeteer-core/internal/node/PuppeteerNode.js'; import {rmSync} from 'puppeteer-core/internal/node/util/fs.js'; -import {getTestState, launch} from './mocha-utils.js'; +import {getTestState, isHeadless, launch} from './mocha-utils.js'; const TMP_FOLDER = path.join(os.tmpdir(), 'pptr_tmp_folder-'); @@ -35,7 +35,7 @@ const serviceWorkerExtensionPath = path.join( 'extension' ); -describe('headful tests', function () { +(!isHeadless ? describe : describe.skip)('headful tests', function () { /* These tests fire up an actual browser so let's * allow a higher timeout */ diff --git a/test/src/mocha-utils.ts b/test/src/mocha-utils.ts index 2fb68550322..19a0aedb447 100644 --- a/test/src/mocha-utils.ts +++ b/test/src/mocha-utils.ts @@ -49,7 +49,7 @@ const headless = (process.env['HEADLESS'] || 'true').trim().toLowerCase() as | 'true' | 'false' | 'new'; -const isHeadless = headless === 'true' || headless === 'new'; +export const isHeadless = headless === 'true' || headless === 'new'; const isFirefox = product === 'firefox'; const isChrome = product === 'chrome'; const protocol = (process.env['PUPPETEER_PROTOCOL'] || 'cdp') as