deno.land / x / packup@v0.1.12 / install_util_test.ts

install_util_test.ts
View Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { assertEquals } from "./test_deps.ts";import { join } from "./deps.ts";import { wasmCacheDir } from "./install_util.ts";
const homedir = (os: typeof Deno.build.os) => os === "windows" ? "/userprofile" : "/home/foo";
Deno.test("wasmCacheDir - returns cache dir for esbuild wasm", () => { assertEquals( wasmCacheDir("windows", homedir, ""), join("/userprofile", ".deno/packup"), ); assertEquals( wasmCacheDir("linux", homedir, ""), join("/home/foo", ".deno/packup"), ); assertEquals( wasmCacheDir("darwin", homedir, ""), join("/home/foo", ".deno/packup"), );});
Deno.test({ name: "wasmCacheDir - respects DENO_DIR if defined", fn: () => { const denoDir = join(Deno.cwd(), ".deno"); const cacheDir = join(denoDir, "packup"); assertEquals(wasmCacheDir("windows", homedir, denoDir), cacheDir); assertEquals(wasmCacheDir("linux", homedir, denoDir), cacheDir); assertEquals(wasmCacheDir("darwin", homedir, denoDir), cacheDir); }, permissions: { read: ["."], },});
packup
📦 Zero-config web application packager in Deno
GitHub Repositorykt3k/packup
GitHub Stars
260

Version Info

Tagged at
4 months ago