Skip to content

Commit b8e2b49

Browse files
committed
added notes on spawnCmd
1 parent 444788a commit b8e2b49

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.run/try pwd (no env)_.run.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="try pwd (no env)_" type="mocha-javascript-test-runner">
3+
<node-interpreter>project</node-interpreter>
4+
<node-options />
5+
<mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
6+
<working-directory>$PROJECT_DIR$</working-directory>
7+
<pass-parent-env>false</pass-parent-env>
8+
<ui>bdd</ui>
9+
<extra-mocha-options />
10+
<test-kind>TEST</test-kind>
11+
<test-file>$PROJECT_DIR$/dev/node-fs-utils-dev/tests/dev-specific/spawnCmd-cwd.test.mjs</test-file>
12+
<test-names>
13+
<name value="spawncmd empty env" />
14+
<name value="try pwd no env" />
15+
</test-names>
16+
<method v="2" />
17+
</configuration>
18+
</component>

dev/node-fs-utils-dev/tests/dev-specific/spawnCmd-cwd.test.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ describe('spawncmd empty env', function(){
116116
const out = spawnSync(pwsh,['-c','Get-ChildItem env:'],{shell:true})
117117
writeToFile('no-env.txt',out.stdout);//this works... lol interesting
118118
});
119+
/**
120+
* https://github.com/codeforwings/nuxt3-win32-posix-path/issues/9
121+
*
122+
*/
119123
it("try pwd no env",function(){
120124
this.timeout(8000);
121125
//shell-no-env.raw.json works but .txt doesnt...
@@ -125,7 +129,8 @@ describe('spawncmd empty env', function(){
125129
shell:false,
126130
// shell:"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
127131
// shell:true,
128-
env:{
132+
env:{},
133+
envs:{
129134
NODE_FIRST_ARG:'shell-no-env',
130135
PWD:cwd(),
131136
//defn works when copied in... wonder what was missing
@@ -147,7 +152,7 @@ describe('spawncmd empty env', function(){
147152
"USERPROFILE": "C:\\Users\\Jason",
148153
"WINDIR": "C:\\Windows"
149154
}
150-
}
155+
};
151156
output = spawnSync(pwsh,['dev/node-fs-utils-dev/tests/dev-specific/generate-env-logs.ps1'],options)
152157
if(output.status !==0){
153158
console.error('stderr: ',output.stderr?.toString());

0 commit comments

Comments
 (0)