mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 05:12:29 +00:00
Add isWindows and related helpers to test harness
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { expect, test } from "bun:test";
|
||||
import { bunEnv, bunExe, ospath } from "harness";
|
||||
import { bunEnv, bunExe, isWindows, ospath } from "harness";
|
||||
import { _nodeModulePaths, builtinModules, isBuiltin, wrap } from "module";
|
||||
import Module from "module";
|
||||
import path from "path";
|
||||
@@ -36,7 +36,7 @@ test("module.Module works", () => {
|
||||
});
|
||||
|
||||
test("_nodeModulePaths() works", () => {
|
||||
const root = process.platform === "win32" ? "C:\\" : "/";
|
||||
const root = isWindows ? "C:\\" : "/";
|
||||
expect(() => {
|
||||
_nodeModulePaths();
|
||||
}).toThrow();
|
||||
|
||||
Reference in New Issue
Block a user