From 30702e2678200b6e21ba142347d2d213b86e9c6d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 20 May 2020 17:52:51 -0400 Subject: move js unit tests to cli/tests (#5678) --- cli/tests/unit/umask_test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 cli/tests/unit/umask_test.ts (limited to 'cli/tests/unit/umask_test.ts') diff --git a/cli/tests/unit/umask_test.ts b/cli/tests/unit/umask_test.ts new file mode 100644 index 000000000..bfac65d52 --- /dev/null +++ b/cli/tests/unit/umask_test.ts @@ -0,0 +1,15 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import { unitTest, assertEquals } from "./test_util.ts"; + +unitTest( + { + ignore: Deno.build.os === "windows", + }, + function umaskSuccess(): void { + const prevMask = Deno.umask(0o020); + const newMask = Deno.umask(prevMask); + const finalMask = Deno.umask(); + assertEquals(newMask, 0o020); + assertEquals(finalMask, prevMask); + } +); -- cgit v1.2.3