Skip to content

Commit 57f229f

Browse files
authored
test(update): use native canonical pnpm fixture paths (#8672)
1 parent c5010b0 commit 57f229f

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎tests/update/update-pnpm-global-store.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function storeCalls(layout: Layout): Call[] {
115115

116116
describe("pnpm global virtual-store owner (#8183)", () => {
117117
let root: string;
118-
beforeEach(() => { root = realpathSync(mkdtempSync(join(tmpdir(), "ocx-pnpm-global-store-"))); });
118+
beforeEach(() => { root = realpathSync.native(mkdtempSync(join(tmpdir(), "ocx-pnpm-global-store-"))); });
119119
afterEach(() => { removeTreeWithRetry(root); });
120120

121121
test("a default-store install resolves through pnpm's store path and updates with the lexical store pinned", () => {

‎tests/update/update-pnpm.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ describe("pnpm executable selection", () => {
132132
});
133133

134134
// A real pnpm home and store: the global-store proof lstat()s the anchor and realpath()s the store.
135-
const fixtureHome = join(realpathSync(mkdtempSync(join(tmpdir(), "ocx-update-store-"))), "pnpm-home");
135+
const fixtureHome = join(realpathSync.native(mkdtempSync(join(tmpdir(), "ocx-update-store-"))), "pnpm-home");
136136
const fixtureStore = join(fixtureHome, "store", "v11");
137137
mkdirSync(fixtureStore, { recursive: true });
138138
/** Where a global-store install of this version lives inside the fixture store. */
@@ -165,7 +165,7 @@ const storeOwnerFor = (): PnpmGlobalOwner => ({
165165

166166
describe("pnpm global owner binding", () => {
167167
test("asks pnpm for its store at pnpm home, without a store override, for a custom store", () => {
168-
const root = realpathSync(mkdtempSync(join(tmpdir(), "ocx-pnpm-store-config-")));
168+
const root = realpathSync.native(mkdtempSync(join(tmpdir(), "ocx-pnpm-store-config-")));
169169
try {
170170
const home = join(root, "pnpm-home"), globalDir = join(home, "global"), globalRoot = join(globalDir, "v11");
171171
const globalBinDir = join(home, "bin"), store = join(root, "custom-store", "v11");

‎tests/update/update-tree-ownership.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function exposingGroup(path: string): string {
3131
}
3232

3333
/** A real pnpm home: the global-store proof refuses an anchor that is missing or reached through a link. */
34-
const STORE_PROOF_HOME = realpathSync(mkdtempSync(join(tmpdir(), "ocx-tree-pnpm-home-")));
34+
const STORE_PROOF_HOME = realpathSync.native(mkdtempSync(join(tmpdir(), "ocx-tree-pnpm-home-")));
3535

3636
/**
3737
* Owner discovery with the store-proof inputs a global-store owner needs: pnpm 12 and a real pnpm
@@ -70,7 +70,7 @@ describe("#4202 install-tree dependency ownership", () => {
7070

7171
beforeEach(() => {
7272
// Canonical spelling: link targets below are compared with the canonical store and group.
73-
root = realpathSync(mkdtempSync(join(tmpdir(), "ocx-tree-ownership-")));
73+
root = realpathSync.native(mkdtempSync(join(tmpdir(), "ocx-tree-ownership-")));
7474
});
7575

7676
afterEach(() => {

0 commit comments

Comments
 (0)