-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: command executor posting to command stream
- Loading branch information
1 parent
a6f8463
commit 43ec575
Showing
2 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/salesforcedx-utils-vscode/test/jest/cli/commandExecutor.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2024, salesforce.com, inc. | ||
* All rights reserved. | ||
* Licensed under the BSD 3-Clause license. | ||
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
|
||
import { CliCommandExecutor } from "../../../src/cli/commandExecutor"; | ||
import { CommandEventStream } from "../../../src/commands/commandEventStream"; | ||
|
||
|
||
describe('CompositeCliCommandExecution', () => { | ||
const commandEventStreamPostSpy = jest.spyOn(CommandEventStream.getInstance(), 'post'); | ||
|
||
}); | ||
|
||
describe('CliCommandExecutor', () => { | ||
describe('patchEnv', () => { | ||
it('should patch the environment with the base environment', () => { | ||
const baseEnvironment = new Map<string, string>(); | ||
baseEnvironment.set('SFDX_ENV', 'test'); | ||
const options = { env: { TEST: 'test' } }; | ||
const patchedOptions = CliCommandExecutor.patchEnv(options, baseEnvironment); | ||
Check failure on line 23 in packages/salesforcedx-utils-vscode/test/jest/cli/commandExecutor.test.ts GitHub Actions / build-and-test / build-all / build-all
Check failure on line 23 in packages/salesforcedx-utils-vscode/test/jest/cli/commandExecutor.test.ts GitHub Actions / build-and-test / unit-tests / linux-unit-tests / linux-unit-tests
Check failure on line 23 in packages/salesforcedx-utils-vscode/test/jest/cli/commandExecutor.test.ts GitHub Actions / build-and-test / unit-tests / windows-unit-tests / windows-unit-tests
|
||
expect(patchedOptions.env).toEqual({ SFDX_ENV: 'test', TEST: 'test', SFDX_TOOL: 'salesforce-vscode-extensions' }); | ||
}); | ||
}); | ||
}); |