Skip to content

Commit 2d0d4fb

Browse files
committed
remove unneeded utility function
1 parent 5810995 commit 2d0d4fb

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

packages/core/src/test/shared/utilities/testUtils.test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,17 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
import assert from 'assert'
6-
import { createExecutableFile, createTestWorkspaceFolder, envWithNewPath, copyEnv } from '../../testUtil'
6+
import { createExecutableFile, createTestWorkspaceFolder, copyEnv } from '../../testUtil'
77
import path from 'path'
88
import { fs } from '../../../shared'
99
import { isWin } from '../../../shared/vscode/env'
1010
import { tryRun } from '../../../shared/utilities/pathFind'
1111

12-
describe('envWithNewPath', function () {
13-
it('gives current path with new PATH', function () {
14-
const fakePath = 'fakePath'
15-
assert.deepStrictEqual(envWithNewPath(fakePath), { ...process.env, PATH: fakePath })
16-
})
17-
})
18-
1912
describe('setEnv', function () {
2013
it('modifies the node environment variables', function () {
2114
const originalEnv = copyEnv()
2215
const fakePath = 'fakePath'
23-
process.env = envWithNewPath('fakePath')
16+
process.env.PATH = 'fakePath'
2417
assert.strictEqual(copyEnv().PATH, fakePath)
2518

2619
process.env = originalEnv

packages/core/src/test/testUtil.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,3 @@ export function getFetchStubWithResponse(response: Partial<Response>) {
618618
export function copyEnv(): NodeJS.ProcessEnv {
619619
return { ...process.env }
620620
}
621-
622-
export function envWithNewPath(newPath: string): NodeJS.ProcessEnv {
623-
return { ...process.env, PATH: newPath }
624-
}

0 commit comments

Comments
 (0)