test: stop path and platform tests depending on the host OS (#9564)
Co-authored-by: Claude Code <[email protected]>
This commit is contained in:
1 parent
bfef973d9e
commit
cc60753aa2
10 files changed
+65
-33
No files matched your search
@@ -1,3 +1,5 @@
|
||||
// @effect-diagnostics nodeBuiltinImport:off - expectations mirror the host path joins the script under test performs.
|
||||
import * as NodePath from "node:path";
|
||||
import { assert, it } from "@effect/vitest";
|
||||
import { PNG } from "pngjs";
|
||||
|
||||
@@ -167,8 +169,14 @@ it("expands both appearances into independent upload-ready directories", () => {
|
||||
directory: showcaseCaptureDirectory("/captures", capture),
|
||||
})),
|
||||
[
|
||||
{ appearance: "light", directory: "/captures/apple/iphone-test/light/t3-code" },
|
||||
{ appearance: "dark", directory: "/captures/apple/iphone-test/dark/t3-code" },
|
||||
{
|
||||
appearance: "light",
|
||||
directory: NodePath.join("/captures", "apple", "iphone-test", "light", "t3-code"),
|
||||
},
|
||||
{
|
||||
appearance: "dark",
|
||||
directory: NodePath.join("/captures", "apple", "iphone-test", "dark", "t3-code"),
|
||||
},
|
||||
],
|
||||
);
|
||||
});
|
||||
@@ -192,10 +200,10 @@ it("expands themes into independent upload-ready directories per appearance", ()
|
||||
showcaseCaptureDirectory("/captures", capture),
|
||||
),
|
||||
[
|
||||
"/captures/apple/iphone-test/light/ocean",
|
||||
"/captures/apple/iphone-test/light/ember",
|
||||
"/captures/apple/iphone-test/dark/ocean",
|
||||
"/captures/apple/iphone-test/dark/ember",
|
||||
NodePath.join("/captures", "apple", "iphone-test", "light", "ocean"),
|
||||
NodePath.join("/captures", "apple", "iphone-test", "light", "ember"),
|
||||
NodePath.join("/captures", "apple", "iphone-test", "dark", "ocean"),
|
||||
NodePath.join("/captures", "apple", "iphone-test", "dark", "ember"),
|
||||
],
|
||||
);
|
||||
});
|
||||
|
||||
@@ -53,7 +53,8 @@ export function resolveAndroidSdkRoot(
|
||||
const configured = environment.ANDROID_HOME ?? environment.ANDROID_SDK_ROOT;
|
||||
if (configured) return configured;
|
||||
const home = environment.HOME ?? environment.USERPROFILE ?? "";
|
||||
return NodePath.join(home, platform === "darwin" ? "Library/Android/sdk" : "Android/Sdk");
|
||||
const path = platform === "win32" ? NodePath.win32 : NodePath.posix;
|
||||
return path.join(home, platform === "darwin" ? "Library/Android/sdk" : "Android/Sdk");
|
||||
}
|
||||
|
||||
const ANDROID_SDK_ROOT = resolveAndroidSdkRoot(NodeProcess.env);
|
||||
|
||||
Reference in new issue
Block a user