diff --git a/packages/related/test/scripts/test.mjs b/packages/related/test/scripts/test.mjs index 183b241856..ae9eb2555a 100644 --- a/packages/related/test/scripts/test.mjs +++ b/packages/related/test/scripts/test.mjs @@ -6,21 +6,21 @@ await executeTestPlan({ "./tests/**/*.test.mjs": { node: { runtime: nodeWorkerThread(), - }, - }, - "./tests/**/coverage_browsers_and_node.test.mjs": { - node: { - allocatedMs: 60_000, - }, - }, - "./tests/**/browser_tabs.test.mjs": { - node: { - allocatedMs: 60_000, - }, - }, - "./tests/**/*_browsers.test.mjs": { - node: { - allocatedMs: 90_000, + allocatedMs: ({ fileRelativeUrl }) => { + if (fileRelativeUrl.endsWith("coverage_browsers_and_node.test.mjs")) { + return 60_000; + } + if (fileRelativeUrl.endsWith("browser_tabs.test.mjs")) { + return 60_000; + } + if (fileRelativeUrl.endsWith("test_plan_logs_browsers.test.mjs")) { + return 160_000; + } + if (fileRelativeUrl.endsWith("_browsers.test.mjs")) { + return 90_000; + } + return 30_000; + }, }, }, }, diff --git a/packages/related/test/src/execution/execute_test_plan.js b/packages/related/test/src/execution/execute_test_plan.js index 25a7889667..6f78062357 100644 --- a/packages/related/test/src/execution/execute_test_plan.js +++ b/packages/related/test/src/execution/execute_test_plan.js @@ -747,7 +747,11 @@ To fix this warning: result: {}, }; if (typeof params.allocatedMs === "function") { - params.allocatedMs = params.allocatedMs(execution); + const allocatedMsResult = params.allocatedMs(execution); + params.allocatedMs = + allocatedMsResult === undefined + ? defaultMsAllocatedPerExecution + : allocatedMsResult; } lastExecution = execution; diff --git a/scripts/test/test.mjs b/scripts/test/test.mjs index 9dbdaaebac..e9b2d79012 100644 --- a/scripts/test/test.mjs +++ b/scripts/test/test.mjs @@ -17,15 +17,7 @@ await executeTestPlan({ testPlan: { "./tests/**/*.test.mjs": { node: { - runtime: nodeWorkerThread({ - env: { - NO_SNAPSHOT_ASSERTION: process.argv.includes( - "--no-snapshot-assertion", - ) - ? "1" - : "", - }, - }), + runtime: nodeWorkerThread(), allocatedMs: ({ fileRelativeUrl }) => { if (fileRelativeUrl.endsWith("_snapshots.test.mjs")) { return 180_000;