summaryrefslogtreecommitdiff
path: root/js/platform_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/platform_test.ts')
-rw-r--r--js/platform_test.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/platform_test.ts b/js/platform_test.ts
index 80a1d9325..65cd2572d 100644
--- a/js/platform_test.ts
+++ b/js/platform_test.ts
@@ -2,8 +2,10 @@
import { test, assert } from "./test_util.ts";
import * as deno from "deno";
-test(function transformPlatformSuccess() {
- // Make sure they are transformed
- assert(deno.arch !== "unknown");
- assert(deno.platform !== "unknown");
+test(function platformTransform() {
+ // deno.platform is injected by rollup at compile time. Here
+ // we check it has been properly transformed.
+ const { arch, os } = deno.platform;
+ assert(arch === "x64");
+ assert(os === "mac" || os === "win" || os === "linux");
});