From d1be4239504d1eb16f8dd53350ace3a7f5bb26fa Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Thu, 25 May 2023 04:53:50 -0700 Subject: [PATCH] Fix scope test --- .../src/singlefolder-tests/terminal.test.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts index ec60b5568ef..8fb25d6116c 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts @@ -879,18 +879,22 @@ import { assertNoRpc, poll } from '../utils'; collection.append('B', '~b2~'); collection.prepend('C', '~c2~'); // Verify get for scope + const defaultOptions: Required = { + applyAtProcessCreation: true, + applyAtShellIntegration: false + }; const expectedScopedCollection = collection.getScopedEnvironmentVariableCollection(scope); - deepStrictEqual(expectedScopedCollection.get('A'), { value: 'scoped~a2~', type: EnvironmentVariableMutatorType.Replace, options: {} }); - deepStrictEqual(expectedScopedCollection.get('B'), { value: 'scoped~b2~', type: EnvironmentVariableMutatorType.Append, options: {} }); - deepStrictEqual(expectedScopedCollection.get('C'), { value: 'scoped~c2~', type: EnvironmentVariableMutatorType.Prepend, options: {} }); + deepStrictEqual(expectedScopedCollection.get('A'), { value: 'scoped~a2~', type: EnvironmentVariableMutatorType.Replace, options: defaultOptions }); + deepStrictEqual(expectedScopedCollection.get('B'), { value: 'scoped~b2~', type: EnvironmentVariableMutatorType.Append, options: defaultOptions }); + deepStrictEqual(expectedScopedCollection.get('C'), { value: 'scoped~c2~', type: EnvironmentVariableMutatorType.Prepend, options: defaultOptions }); // Verify forEach const entries: [string, EnvironmentVariableMutator][] = []; expectedScopedCollection.forEach((v, m) => entries.push([v, m])); deepStrictEqual(entries.map(v => v[1]), [ - { value: 'scoped~a2~', type: EnvironmentVariableMutatorType.Replace, options: {} }, - { value: 'scoped~b2~', type: EnvironmentVariableMutatorType.Append, options: {} }, - { value: 'scoped~c2~', type: EnvironmentVariableMutatorType.Prepend, options: {} } + { value: 'scoped~a2~', type: EnvironmentVariableMutatorType.Replace, options: defaultOptions }, + { value: 'scoped~b2~', type: EnvironmentVariableMutatorType.Append, options: defaultOptions }, + { value: 'scoped~c2~', type: EnvironmentVariableMutatorType.Prepend, options: defaultOptions } ]); }); });