Skip to content

Commit

Permalink
Add missing node os.release() implementation (denoland/deno#4065)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecyrbe authored and caspervonb committed Jan 31, 2021
1 parent 670772d commit 7811b11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions node/os.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ export function platform(): string {
return process.platform;
}

/** Not yet implemented */
/** Returns the operating system as a string */
export function release(): string {
notImplemented(SEE_GITHUB_ISSUE);
return Deno.osRelease();
}

/** Not yet implemented */
Expand Down
14 changes: 7 additions & 7 deletions node/os_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ test({
}
});

test({
name: "release is a string",
fn() {
assertEquals(typeof os.release(), "string");
}
});

test({
name: "getPriority(): PID must be a 32 bit integer",
fn() {
Expand Down Expand Up @@ -216,13 +223,6 @@ test({
Error,
"Not implemented"
);
assertThrows(
() => {
os.release();
},
Error,
"Not implemented"
);
assertThrows(
() => {
os.setPriority(0);
Expand Down

0 comments on commit 7811b11

Please sign in to comment.