Skip to content

Commit 127003f

Browse files
committed
comment
1 parent 9b66d8c commit 127003f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

packages/core/src/test/shared/env/resolveEnv.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,27 @@ describe('resolveEnv', async function () {
1919
})
2020

2121
describe('resolveWindows', async function () {
22+
beforeEach(function () {
23+
sandbox.stub(process, 'platform').value('win32')
24+
})
25+
2226
it('mergeResolvedShellPath should not change path on windows', async function () {
2327
const env = await mergeResolvedShellPath(process.env)
2428
assert(env.PATH)
2529
assert.strictEqual(env, process.env)
2630
})
2731
})
32+
33+
describe('resolveMac', async function () {
34+
beforeEach(function () {
35+
sandbox.stub(process, 'platform').value('darwin')
36+
})
37+
38+
it('mergeResolvedShellPath should get path on mac', async function () {
39+
sandbox.stub(process.env, 'PATH').value('')
40+
const env = await mergeResolvedShellPath(process.env)
41+
assert(env.PATH)
42+
assert.notEqual(env, process.env)
43+
})
44+
})
2845
})
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "getSpawnEnv always return correct env on windows"
4+
}

0 commit comments

Comments
 (0)