From 3fd96a711dcd57745466c8b114508d8b4c654d40 Mon Sep 17 00:00:00 2001 From: epszaw Date: Sat, 6 Apr 2024 10:28:36 +0200 Subject: [PATCH] limit test workers for vitest integration tests make vitest tests silent make cypress tests silent --- packages/allure-cypress/src/reporter.ts | 1 - packages/allure-cypress/test/utils.ts | 2 +- packages/allure-vitest/test/utils.ts | 2 +- packages/allure-vitest/vitest.config.ts | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/allure-cypress/src/reporter.ts b/packages/allure-cypress/src/reporter.ts index 502899336..2f874872f 100644 --- a/packages/allure-cypress/src/reporter.ts +++ b/packages/allure-cypress/src/reporter.ts @@ -26,7 +26,6 @@ export class AllureCypress { currentTestsByAbsolutePath = new Map(); // need to keep the variable here because we recieve end-message and finish the current test separately currentSteps: AllureStep[] = []; - constructor(private config?: AllureCypressConfig) { this.runtime = new AllureNodeRuntime({ writer: new FileSystemAllureWriter({ diff --git a/packages/allure-cypress/test/utils.ts b/packages/allure-cypress/test/utils.ts index d6eff6507..859d862dc 100644 --- a/packages/allure-cypress/test/utils.ts +++ b/packages/allure-cypress/test/utils.ts @@ -68,7 +68,7 @@ export const runCypressInlineTest = async ( const moduleRootPath = require.resolve("cypress"); const modulePath = resolve(moduleRootPath, "../bin/cypress"); - const args = ["run", "-s", testFilePath]; + const args = ["run", "-s", testFilePath, "-q"]; const testProcess = fork(modulePath, args, { env: { ...process.env, diff --git a/packages/allure-vitest/test/utils.ts b/packages/allure-vitest/test/utils.ts index 5e6fec861..07c1829f7 100644 --- a/packages/allure-vitest/test/utils.ts +++ b/packages/allure-vitest/test/utils.ts @@ -59,7 +59,7 @@ export const runVitestInlineTest = async ( } const modulePath = require.resolve("vitest/dist/cli-wrapper.js"); - const args = ["run", "--config", configFilePath, "--dir", testDir]; + const args = ["run", "--config", configFilePath, "--dir", testDir, "--silent"]; const testProcess = fork(modulePath, args, { env: { ...process.env, diff --git a/packages/allure-vitest/vitest.config.ts b/packages/allure-vitest/vitest.config.ts index ed182e86f..cfd540a67 100644 --- a/packages/allure-vitest/vitest.config.ts +++ b/packages/allure-vitest/vitest.config.ts @@ -4,6 +4,7 @@ import AllureReporter from "allure-vitest/reporter"; export default defineConfig({ test: { testTimeout: 10000, + fileParallelism: false, setupFiles: ["allure-vitest/setup"], reporters: [ "default",