test: stabilize gateway suites
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user