(path: string, expectMode?: number)
| 17 | import { umask } from "node:process"; |
| 18 | |
| 19 | function assertDirectory(path: string, expectMode?: number) { |
| 20 | const dirStat = lstatSync(path); |
| 21 | assert(dirStat.isDirectory()); |
| 22 | if (platform() !== "win32" && expectMode !== undefined) { |
| 23 | assertExists(dirStat.mode); |
| 24 | assertEquals(dirStat.mode & 0o777, expectMode & ~umask(0o022)); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | Deno.test("mkdir() creates a directory with the default mode", async () => { |
| 29 | const tempDirPath = await makeTempDir({ prefix: "mkdir_" }); |
no test coverage detected