mirror of
https://github.com/denoland/deno.git
synced 2024-12-28 01:59:06 -05:00
fix: replace Deno.platform usages (denoland/deno_std#590)
Original: 0e6f163ac6
This commit is contained in:
parent
d7f3e28eed
commit
7b22dec0fa
5 changed files with 6 additions and 6 deletions
|
@ -16,7 +16,7 @@ import { ensureSymlink, ensureSymlinkSync } from "./ensure_symlink.ts";
|
|||
const testdataDir = path.resolve("fs", "testdata");
|
||||
|
||||
// TODO(axetroy): Add test for Windows once symlink is implemented for Windows.
|
||||
const isWindows = Deno.platform.os === "win";
|
||||
const isWindows = Deno.build.os === "win";
|
||||
|
||||
async function testCopy(
|
||||
name: string,
|
||||
|
|
|
@ -10,7 +10,7 @@ import { ensureSymlink, ensureSymlinkSync } from "./ensure_symlink.ts";
|
|||
import * as path from "./path/mod.ts";
|
||||
|
||||
const testdataDir = path.resolve("fs", "testdata");
|
||||
const isWindows = Deno.platform.os === "win";
|
||||
const isWindows = Deno.build.os === "win";
|
||||
|
||||
test(async function ensureSymlinkIfItNotExist(): Promise<void> {
|
||||
const testDir = path.join(testdataDir, "link_file_1");
|
||||
|
|
|
@ -61,9 +61,9 @@ test(async function serveDirectory(): Promise<void> {
|
|||
// `Deno.FileInfo` is not completely compatible with Windows yet
|
||||
// TODO: `mode` should work correctly in the future.
|
||||
// Correct this test case accordingly.
|
||||
Deno.platform.os !== "win" &&
|
||||
Deno.build.os !== "win" &&
|
||||
assert(/<td class="mode">\([a-zA-Z-]{10}\)<\/td>/.test(page));
|
||||
Deno.platform.os === "win" &&
|
||||
Deno.build.os === "win" &&
|
||||
assert(/<td class="mode">\(unknown mode\)<\/td>/.test(page));
|
||||
assert(
|
||||
page.includes(
|
||||
|
|
|
@ -10,7 +10,7 @@ const encoder = new TextEncoder();
|
|||
const decoder = new TextDecoder("utf-8");
|
||||
// Regular expression to test disk driver letter. eg "C:\\User\username\path\to"
|
||||
const driverLetterReg = /^[c-z]:/i;
|
||||
const isWindows = Deno.platform.os === "win";
|
||||
const isWindows = Deno.build.os === "win";
|
||||
|
||||
function showHelp(): void {
|
||||
console.log(`deno installer
|
||||
|
|
|
@ -10,7 +10,7 @@ import * as fs from "../fs/mod.ts";
|
|||
import { install, isRemoteUrl } from "./mod.ts";
|
||||
|
||||
let fileServer: Deno.Process;
|
||||
const isWindows = Deno.platform.os === "win";
|
||||
const isWindows = Deno.build.os === "win";
|
||||
|
||||
// copied from `http/file_server_test.ts`
|
||||
async function startFileServer(): Promise<void> {
|
||||
|
|
Loading…
Reference in a new issue