Skip to content

Commit

Permalink
small update
Browse files Browse the repository at this point in the history
  • Loading branch information
dmail committed Aug 19, 2024
1 parent af87b0e commit fdbda65
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 25 deletions.
30 changes: 15 additions & 15 deletions packages/related/test/scripts/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
},
},
},
Expand Down
6 changes: 5 additions & 1 deletion packages/related/test/src/execution/execute_test_plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 1 addition & 9 deletions scripts/test/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fdbda65

Please sign in to comment.