test: stabilize gateway suites

This commit is contained in:
Peter Steinberger
2026-01-18 05:24:28 +00:00
parent 8f998741b7
commit 208398973b
5 changed files with 35 additions and 5 deletions

View File

@@ -31,6 +31,9 @@ function fallbackHostName() {
export async function getMachineDisplayName(): Promise<string> {
if (cachedPromise) return cachedPromise;
cachedPromise = (async () => {
if (process.env.VITEST || process.env.NODE_ENV === "test") {
return fallbackHostName();
}
if (process.platform === "darwin") {
const computerName = await tryScutil("ComputerName");
if (computerName) return computerName;