Skip to content

Commit fd9457f

Browse files
committed
add test
1 parent 9520e47 commit fd9457f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*!
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
import assert from 'assert'
7+
import { mergeResolvedShellPath } from '../../../shared/env/resolveEnv'
8+
import sinon from 'sinon'
9+
import { EnvironmentVariables } from '../../../shared/environmentVariables'
10+
11+
describe('resolveEnv', async function () {
12+
let sandbox: sinon.SinonSandbox
13+
beforeEach(function () {
14+
sandbox = sinon.createSandbox()
15+
sandbox.stub(process, 'env').value({
16+
platform: 'win32',
17+
} as EnvironmentVariables)
18+
})
19+
20+
afterEach(function () {
21+
sandbox.restore()
22+
})
23+
24+
describe('resolveWindows', async function () {
25+
it('mergeResolvedShellPath should not change path on windows', async function () {
26+
const env = await mergeResolvedShellPath(process.env)
27+
assert.strictEqual(env.path, process.env.path)
28+
})
29+
})
30+
})

0 commit comments

Comments
 (0)