test: skip dumpio test in non-headless modes (#8388)
This commit is contained in:
parent
b349d71dcd
commit
f657233ca4
@ -17,12 +17,12 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
|
||||
import expect from 'expect';
|
||||
import { getTestState, itChromeOnly } from './mocha-utils'; // eslint-disable-line import/extensions
|
||||
import { getTestState, itHeadlessOnly } from './mocha-utils'; // eslint-disable-line import/extensions
|
||||
|
||||
import path from 'path';
|
||||
|
||||
describe('Fixtures', function () {
|
||||
itChromeOnly('dumpio option should work with pipe option ', async () => {
|
||||
itHeadlessOnly('dumpio option should work with pipe option ', async () => {
|
||||
const { defaultBrowserOptions, puppeteerPath } = getTestState();
|
||||
|
||||
let dumpioData = '';
|
||||
|
@ -158,6 +158,14 @@ export const itChromeOnly = (
|
||||
else return xit(description, body);
|
||||
};
|
||||
|
||||
export const itHeadlessOnly = (
|
||||
description: string,
|
||||
body: Mocha.Func
|
||||
): Mocha.Test => {
|
||||
if (isChrome && isHeadless === true) return it(description, body);
|
||||
else return xit(description, body);
|
||||
};
|
||||
|
||||
export const itFirefoxOnly = (
|
||||
description: string,
|
||||
body: Mocha.Func
|
||||
|
Loading…
Reference in New Issue
Block a user