From 653973a428db913b4a449707f015dff9877880dd Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 24 Nov 2021 10:40:59 +0100 Subject: [PATCH] fix(node/os): implement os.hostname() Refs #1436. --- node/os.ts | 2 +- node/os_test.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/node/os.ts b/node/os.ts index cc8907723028..cc4eb4941c79 100644 --- a/node/os.ts +++ b/node/os.ts @@ -173,7 +173,7 @@ export function homedir(): string | null { /** Returns the host name of the operating system as a string. */ export function hostname(): string { - notImplemented(SEE_GITHUB_ISSUE); + return Deno.hostname(); } /** Returns an array containing the 1, 5, and 15 minute load averages */ diff --git a/node/os_test.ts b/node/os_test.ts index aa7d052a05d0..40e8f57e7943 100644 --- a/node/os_test.ts +++ b/node/os_test.ts @@ -38,7 +38,6 @@ Deno.test({ Deno.test({ name: "hostname is a string", - ignore: true, fn() { assertEquals(typeof os.hostname(), "string"); },