Skip to content

Commit 0794d2c

Browse files
NickGerlemanfacebook-github-bot
authored andcommitted
Make gentest headless by default
Summary: This makes `yarn gentest` a little less annoying. It seems a lot slower/less rliable than it used to be, for reasons I don't understand, but really could use a rejiggering. https://developer.chrome.com/docs/chromium/headless {F1985838453} Differential Revision: D93960790
1 parent 9dff914 commit 0794d2c

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/validate-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run: yarn gentest-validate
2222

2323
- name: yarn gentest
24-
run: yarn gentest -h
24+
run: yarn gentest
2525

2626
- name: Check for modified tests
2727
run: |

gentest/gentest-driver.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function addSignatureToSourceCode(sourceCode: string): string {
3131
const argv = minimist(process.argv.slice(2));
3232
const specificFixture = argv.f || argv.fixture;
3333
const suspend = argv.s || argv.suspend;
34-
const headless = argv.h || argv.headless;
34+
const createWindow = argv.w || argv['create-window'];
3535

3636
const gentestDir = dirname(fileURLToPath(import.meta.url));
3737
const yogaDir = dirname(gentestDir);
@@ -55,7 +55,9 @@ options.addArguments(
5555
'--window-position=0,0',
5656
'--hide-scrollbars',
5757
);
58-
headless && options.addArguments('--headless');
58+
if (!createWindow) {
59+
options.addArguments('--headless');
60+
}
5961
options.setLoggingPrefs({
6062
browser: 'ALL',
6163
performance: 'ALL',

0 commit comments

Comments
 (0)