Skip to content

Commit 2fe1a30

Browse files
committed
Fix test failures
1 parent 16533f5 commit 2fe1a30

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

src/vs/workbench/contrib/terminal/test/common/environmentVariableCollection.test.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ suite('EnvironmentVariable - MergedEnvironmentVariableCollection', () => {
3737
]));
3838
deepStrictEqual([...merged.getVariableMap(undefined).entries()], [
3939
['A', [
40-
{ extensionIdentifier: 'ext4', type: EnvironmentVariableMutatorType.Append, value: 'a4', variable: 'A' },
41-
{ extensionIdentifier: 'ext3', type: EnvironmentVariableMutatorType.Prepend, value: 'a3', variable: 'A' },
42-
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Append, value: 'a2', variable: 'A' },
43-
{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Prepend, value: 'a1', variable: 'A' }
40+
{ extensionIdentifier: 'ext4', type: EnvironmentVariableMutatorType.Append, value: 'a4', variable: 'A', options: undefined },
41+
{ extensionIdentifier: 'ext3', type: EnvironmentVariableMutatorType.Prepend, value: 'a3', variable: 'A', options: undefined },
42+
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Append, value: 'a2', variable: 'A', options: undefined },
43+
{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Prepend, value: 'a1', variable: 'A', options: undefined }
4444
]]
4545
]);
4646
});
@@ -70,9 +70,9 @@ suite('EnvironmentVariable - MergedEnvironmentVariableCollection', () => {
7070
]));
7171
deepStrictEqual([...merged.getVariableMap(undefined).entries()], [
7272
['A', [
73-
{ extensionIdentifier: 'ext3', type: EnvironmentVariableMutatorType.Replace, value: 'a3', variable: 'A' },
74-
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Append, value: 'a2', variable: 'A' },
75-
{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Prepend, value: 'a1', variable: 'A' }
73+
{ extensionIdentifier: 'ext3', type: EnvironmentVariableMutatorType.Replace, value: 'a3', variable: 'A', options: undefined },
74+
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Append, value: 'a2', variable: 'A', options: undefined },
75+
{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Prepend, value: 'a1', variable: 'A', options: undefined }
7676
]]
7777
], 'The ext4 entry should be removed as it comes after a Replace');
7878
});
@@ -104,9 +104,9 @@ suite('EnvironmentVariable - MergedEnvironmentVariableCollection', () => {
104104
]));
105105
deepStrictEqual([...merged.getVariableMap(scope2).entries()], [
106106
['A', [
107-
{ extensionIdentifier: 'ext4', type: EnvironmentVariableMutatorType.Append, value: 'a4', variable: 'A' },
108-
{ extensionIdentifier: 'ext3', type: EnvironmentVariableMutatorType.Prepend, value: 'a3', scope: scope2, variable: 'A' },
109-
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Append, value: 'a2', variable: 'A' },
107+
{ extensionIdentifier: 'ext4', type: EnvironmentVariableMutatorType.Append, value: 'a4', variable: 'A', options: undefined },
108+
{ extensionIdentifier: 'ext3', type: EnvironmentVariableMutatorType.Prepend, value: 'a3', scope: scope2, variable: 'A', options: undefined },
109+
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Append, value: 'a2', variable: 'A', options: undefined },
110110
]]
111111
]);
112112
});
@@ -138,8 +138,8 @@ suite('EnvironmentVariable - MergedEnvironmentVariableCollection', () => {
138138
]));
139139
deepStrictEqual([...merged.getVariableMap(undefined).entries()], [
140140
['A', [
141-
{ extensionIdentifier: 'ext4', type: EnvironmentVariableMutatorType.Append, value: 'a4', variable: 'A' },
142-
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Append, value: 'a2', variable: 'A' },
141+
{ extensionIdentifier: 'ext4', type: EnvironmentVariableMutatorType.Append, value: 'a4', variable: 'A', options: undefined },
142+
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Append, value: 'a2', variable: 'A', options: undefined },
143143
]]
144144
]);
145145
});
@@ -322,7 +322,7 @@ suite('EnvironmentVariable - MergedEnvironmentVariableCollection', () => {
322322
strictEqual(diff.removed.size, 0);
323323
const entries = [...diff.added.entries()];
324324
deepStrictEqual(entries, [
325-
['A', [{ extensionIdentifier: 'ext1', value: 'a', type: EnvironmentVariableMutatorType.Replace, variable: 'A' }]]
325+
['A', [{ extensionIdentifier: 'ext1', value: 'a', type: EnvironmentVariableMutatorType.Replace, variable: 'A', options: undefined }]]
326326
]);
327327
});
328328

@@ -347,7 +347,7 @@ suite('EnvironmentVariable - MergedEnvironmentVariableCollection', () => {
347347
strictEqual(diff.removed.size, 0);
348348
const entries = [...diff.added.entries()];
349349
deepStrictEqual(entries, [
350-
['B', [{ extensionIdentifier: 'ext1', value: 'b', type: EnvironmentVariableMutatorType.Append, variable: 'B' }]]
350+
['B', [{ extensionIdentifier: 'ext1', value: 'b', type: EnvironmentVariableMutatorType.Append, variable: 'B', options: undefined }]]
351351
]);
352352
});
353353

@@ -376,7 +376,7 @@ suite('EnvironmentVariable - MergedEnvironmentVariableCollection', () => {
376376
strictEqual(diff.changed.size, 0);
377377
strictEqual(diff.removed.size, 0);
378378
deepStrictEqual([...diff.added.entries()], [
379-
['A', [{ extensionIdentifier: 'ext2', value: 'a2', type: EnvironmentVariableMutatorType.Append, variable: 'A' }]]
379+
['A', [{ extensionIdentifier: 'ext2', value: 'a2', type: EnvironmentVariableMutatorType.Append, variable: 'A', options: undefined }]]
380380
]);
381381

382382
const merged3 = new MergedEnvironmentVariableCollection(new Map([
@@ -443,7 +443,7 @@ suite('EnvironmentVariable - MergedEnvironmentVariableCollection', () => {
443443
strictEqual(diff.changed.size, 0);
444444
strictEqual(diff.added.size, 0);
445445
deepStrictEqual([...diff.removed.entries()], [
446-
['B', [{ extensionIdentifier: 'ext1', value: 'b', type: EnvironmentVariableMutatorType.Replace, variable: 'B' }]]
446+
['B', [{ extensionIdentifier: 'ext1', value: 'b', type: EnvironmentVariableMutatorType.Replace, variable: 'B', options: undefined }]]
447447
]);
448448
});
449449

@@ -468,8 +468,8 @@ suite('EnvironmentVariable - MergedEnvironmentVariableCollection', () => {
468468
strictEqual(diff.added.size, 0);
469469
strictEqual(diff.removed.size, 0);
470470
deepStrictEqual([...diff.changed.entries()], [
471-
['A', [{ extensionIdentifier: 'ext1', value: 'a2', type: EnvironmentVariableMutatorType.Replace, variable: 'A' }]],
472-
['B', [{ extensionIdentifier: 'ext1', value: 'b', type: EnvironmentVariableMutatorType.Append, variable: 'B' }]]
471+
['A', [{ extensionIdentifier: 'ext1', value: 'a2', type: EnvironmentVariableMutatorType.Replace, variable: 'A', options: undefined }]],
472+
['B', [{ extensionIdentifier: 'ext1', value: 'b', type: EnvironmentVariableMutatorType.Append, variable: 'B', options: undefined }]]
473473
]);
474474
});
475475

@@ -492,13 +492,13 @@ suite('EnvironmentVariable - MergedEnvironmentVariableCollection', () => {
492492
]));
493493
const diff = merged1.diff(merged2, undefined)!;
494494
deepStrictEqual([...diff.added.entries()], [
495-
['C', [{ extensionIdentifier: 'ext1', value: 'c', type: EnvironmentVariableMutatorType.Append, variable: 'C' }]],
495+
['C', [{ extensionIdentifier: 'ext1', value: 'c', type: EnvironmentVariableMutatorType.Append, variable: 'C', options: undefined }]],
496496
]);
497497
deepStrictEqual([...diff.removed.entries()], [
498-
['B', [{ extensionIdentifier: 'ext1', value: 'b', type: EnvironmentVariableMutatorType.Prepend, variable: 'B' }]]
498+
['B', [{ extensionIdentifier: 'ext1', value: 'b', type: EnvironmentVariableMutatorType.Prepend, variable: 'B', options: undefined }]]
499499
]);
500500
deepStrictEqual([...diff.changed.entries()], [
501-
['A', [{ extensionIdentifier: 'ext1', value: 'a2', type: EnvironmentVariableMutatorType.Replace, variable: 'A' }]]
501+
['A', [{ extensionIdentifier: 'ext1', value: 'a2', type: EnvironmentVariableMutatorType.Replace, variable: 'A', options: undefined }]]
502502
]);
503503
});
504504

@@ -524,10 +524,10 @@ suite('EnvironmentVariable - MergedEnvironmentVariableCollection', () => {
524524
const diff = merged1.diff(merged2, scope1)!;
525525
strictEqual(diff.added.size, 0);
526526
deepStrictEqual([...diff.removed.entries()], [
527-
['B', [{ extensionIdentifier: 'ext1', value: 'b', type: EnvironmentVariableMutatorType.Prepend, variable: 'B' }]]
527+
['B', [{ extensionIdentifier: 'ext1', value: 'b', type: EnvironmentVariableMutatorType.Prepend, variable: 'B', options: undefined }]]
528528
]);
529529
deepStrictEqual([...diff.changed.entries()], [
530-
['A', [{ extensionIdentifier: 'ext1', value: 'a2', type: EnvironmentVariableMutatorType.Replace, scope: scope1, variable: 'A' }]]
530+
['A', [{ extensionIdentifier: 'ext1', value: 'a2', type: EnvironmentVariableMutatorType.Replace, scope: scope1, variable: 'A', options: undefined }]]
531531
]);
532532
});
533533
});

src/vs/workbench/contrib/terminal/test/common/environmentVariableService.test.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@ suite('EnvironmentVariable - EnvironmentVariableService', () => {
5454
collection.set('C-key', { value: 'c', type: EnvironmentVariableMutatorType.Prepend, variable: 'C' });
5555
environmentVariableService.set('ext1', { map: collection, persistent: true });
5656
deepStrictEqual([...environmentVariableService.mergedCollection.getVariableMap(undefined).entries()], [
57-
['A', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Replace, value: 'a', variable: 'A' }]],
58-
['B', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Append, value: 'b', variable: 'B' }]],
59-
['C', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Prepend, value: 'c', variable: 'C' }]]
57+
['A', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Replace, value: 'a', variable: 'A', options: undefined }]],
58+
['B', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Append, value: 'b', variable: 'B', options: undefined }]],
59+
['C', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Prepend, value: 'c', variable: 'C', options: undefined }]]
6060
]);
6161

6262
// Persist with old service, create a new service with the same storage service to verify restore
6363
environmentVariableService.persistCollections();
6464
const service2: TestEnvironmentVariableService = instantiationService.createInstance(TestEnvironmentVariableService);
6565
deepStrictEqual([...service2.mergedCollection.getVariableMap(undefined).entries()], [
66-
['A', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Replace, value: 'a', variable: 'A' }]],
67-
['B', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Append, value: 'b', variable: 'B' }]],
68-
['C', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Prepend, value: 'c', variable: 'C' }]]
66+
['A', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Replace, value: 'a', variable: 'A', options: undefined }]],
67+
['B', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Append, value: 'b', variable: 'B', options: undefined }]],
68+
['C', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Prepend, value: 'c', variable: 'C', options: undefined }]]
6969
]);
7070
});
7171

@@ -85,10 +85,10 @@ suite('EnvironmentVariable - EnvironmentVariableService', () => {
8585
environmentVariableService.set('ext3', { map: collection3, persistent: true });
8686
deepStrictEqual([...environmentVariableService.mergedCollection.getVariableMap(undefined).entries()], [
8787
['A', [
88-
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Replace, value: 'a2', variable: 'A' },
89-
{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Append, value: 'a1', variable: 'A' }
88+
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Replace, value: 'a2', variable: 'A', options: undefined },
89+
{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Append, value: 'a1', variable: 'A', options: undefined }
9090
]],
91-
['B', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Replace, value: 'b1', variable: 'B' }]]
91+
['B', [{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Replace, value: 'b1', variable: 'B', options: undefined }]]
9292
]);
9393
});
9494

@@ -106,9 +106,9 @@ suite('EnvironmentVariable - EnvironmentVariableService', () => {
106106
// The entries should be ordered in the order they are applied
107107
deepStrictEqual([...environmentVariableService.mergedCollection.getVariableMap(undefined).entries()], [
108108
['A', [
109-
{ extensionIdentifier: 'ext3', type: EnvironmentVariableMutatorType.Replace, value: 'a3', variable: 'A' },
110-
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Prepend, value: 'a2:', variable: 'A' },
111-
{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Append, value: ':a1', variable: 'A' }
109+
{ extensionIdentifier: 'ext3', type: EnvironmentVariableMutatorType.Replace, value: 'a3', variable: 'A', options: undefined },
110+
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Prepend, value: 'a2:', variable: 'A', options: undefined },
111+
{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Append, value: ':a1', variable: 'A', options: undefined }
112112
]]
113113
]);
114114

@@ -134,8 +134,8 @@ suite('EnvironmentVariable - EnvironmentVariableService', () => {
134134
// The entries should be ordered in the order they are applied
135135
deepStrictEqual([...environmentVariableService.mergedCollection.getVariableMap(scope1).entries()], [
136136
['A', [
137-
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Prepend, value: 'a2:', variable: 'A' },
138-
{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Append, value: ':a1', scope: scope1, variable: 'A' }
137+
{ extensionIdentifier: 'ext2', type: EnvironmentVariableMutatorType.Prepend, value: 'a2:', variable: 'A', options: undefined },
138+
{ extensionIdentifier: 'ext1', type: EnvironmentVariableMutatorType.Append, value: ':a1', scope: scope1, variable: 'A', options: undefined }
139139
]]
140140
]);
141141

0 commit comments

Comments
 (0)