File tree Expand file tree Collapse file tree
packages/create-rezi/src/__tests__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ import { resolve } from "node:path";
22import { assert , test } from "@rezi-ui/testkit" ;
33import { createInstallEnv , resolveInstallCwd , resolveInstallInvocation } from "../index.js" ;
44
5+ const WINDOWS_ROAMING_NPM_EXEC_PATH =
6+ "C:\\Users\\example\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" ;
7+
58test ( "resolveInstallCwd resolves targetDir against the current base directory" , ( ) => {
69 assert . equal (
710 resolveInstallCwd ( "my-app" , "/tmp/rezi-parent" ) ,
@@ -58,17 +61,14 @@ test("resolveInstallInvocation prefers npm_execpath and falls back to node-adjac
5861 assert . deepEqual (
5962 resolveInstallInvocation ( "npm" , {
6063 env : {
61- npm_execpath : "C:\\Users\\k3nig\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" ,
64+ npm_execpath : WINDOWS_ROAMING_NPM_EXEC_PATH ,
6265 } ,
6366 platform : "win32" ,
6467 nodeExecPath : "C:\\Program Files\\nodejs\\node.exe" ,
6568 } ) ,
6669 {
6770 command : "C:\\Program Files\\nodejs\\node.exe" ,
68- args : [
69- "C:\\Users\\k3nig\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" ,
70- "install" ,
71- ] ,
71+ args : [ WINDOWS_ROAMING_NPM_EXEC_PATH , "install" ] ,
7272 } ,
7373 ) ;
7474
You can’t perform that action at this time.
0 commit comments