From 35692dbd9f6f4ba1ce6ccd4e02167fbc2034a99b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Sun, 23 Oct 2022 12:19:40 +0200 Subject: [PATCH] make the reporter dynamic --- scripts/tasks/e2e-tests.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/tasks/e2e-tests.ts b/scripts/tasks/e2e-tests.ts index 470097f83594..8834737ba942 100644 --- a/scripts/tasks/e2e-tests.ts +++ b/scripts/tasks/e2e-tests.ts @@ -10,8 +10,10 @@ export const e2eTests: Task = { return false; }, async run({ codeDir, junitFilename, template }, { dryRun, debug }) { + const reporter = process.env.CI ? 'junit' : 'html'; + await exec( - 'yarn playwright test --reporter=junit', + `yarn playwright test --reporter=${reporter}`, { env: { STORYBOOK_URL: `http://localhost:${PORT}`,