@codingame/monaco-vscode-testing-service-override 3.2.3 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/package.json +8 -8
  2. package/testing.js +5 -4
  3. package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
  4. package/external/tslib/tslib.es6.js +0 -11
  5. package/vscode/src/vs/workbench/contrib/testing/browser/codeCoverageDecorations.js +0 -567
  6. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/display.js +0 -3
  7. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/index.js +0 -83
  8. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/listProjection.js +0 -186
  9. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/testItemContextOverlay.js +0 -18
  10. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/testingObjectTree.js +0 -46
  11. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/testingViewState.js +0 -17
  12. package/vscode/src/vs/workbench/contrib/testing/browser/explorerProjections/treeProjection.js +0 -225
  13. package/vscode/src/vs/workbench/contrib/testing/browser/icons.js +0 -174
  14. package/vscode/src/vs/workbench/contrib/testing/browser/media/testing.css.js +0 -6
  15. package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageBars.js +0 -227
  16. package/vscode/src/vs/workbench/contrib/testing/browser/testCoverageView.js +0 -545
  17. package/vscode/src/vs/workbench/contrib/testing/browser/testExplorerActions.js +0 -1662
  18. package/vscode/src/vs/workbench/contrib/testing/browser/testing.contribution.js +0 -219
  19. package/vscode/src/vs/workbench/contrib/testing/browser/testingDecorations.js +0 -970
  20. package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.js +0 -236
  21. package/vscode/src/vs/workbench/contrib/testing/browser/testingExplorerView.js +0 -1227
  22. package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.css.js +0 -6
  23. package/vscode/src/vs/workbench/contrib/testing/browser/testingOutputPeek.js +0 -2091
  24. package/vscode/src/vs/workbench/contrib/testing/browser/testingProgressUiService.js +0 -142
  25. package/vscode/src/vs/workbench/contrib/testing/browser/testingViewPaneContainer.js +0 -47
  26. package/vscode/src/vs/workbench/contrib/testing/browser/theme.js +0 -259
  27. package/vscode/src/vs/workbench/contrib/testing/common/configuration.js +0 -273
  28. package/vscode/src/vs/workbench/contrib/testing/common/constants.js +0 -59
  29. package/vscode/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.js +0 -129
  30. package/vscode/src/vs/workbench/contrib/testing/common/testExclusions.js +0 -48
  31. package/vscode/src/vs/workbench/contrib/testing/common/testServiceImpl.js +0 -296
  32. package/vscode/src/vs/workbench/contrib/testing/common/testingContentProvider.js +0 -125
  33. package/vscode/src/vs/workbench/contrib/testing/common/testingUri.js +0 -67
@@ -1,273 +0,0 @@
1
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
- import { observableFromEvent } from 'vscode/vscode/vs/base/common/observableInternal/utils';
3
-
4
- const testingConfiguration = {
5
- id: 'testing',
6
- order: 21,
7
- title: ( localizeWithPath(
8
- 'vs/workbench/contrib/testing/common/configuration',
9
- 'testConfigurationTitle',
10
- "Testing"
11
- )),
12
- type: 'object',
13
- properties: {
14
- ["testing.autoRun.delay" ]: {
15
- type: 'integer',
16
- minimum: 0,
17
- description: ( localizeWithPath(
18
- 'vs/workbench/contrib/testing/common/configuration',
19
- 'testing.autoRun.delay',
20
- "How long to wait, in milliseconds, after a test is marked as outdated and starting a new run."
21
- )),
22
- default: 1000,
23
- },
24
- ["testing.automaticallyOpenPeekView" ]: {
25
- description: ( localizeWithPath(
26
- 'vs/workbench/contrib/testing/common/configuration',
27
- 'testing.automaticallyOpenPeekView',
28
- "Configures when the error Peek view is automatically opened."
29
- )),
30
- enum: [
31
- "failureAnywhere" ,
32
- "failureInVisibleDocument" ,
33
- "never" ,
34
- ],
35
- default: "failureInVisibleDocument" ,
36
- enumDescriptions: [
37
- ( localizeWithPath(
38
- 'vs/workbench/contrib/testing/common/configuration',
39
- 'testing.automaticallyOpenPeekView.failureAnywhere',
40
- "Open automatically no matter where the failure is."
41
- )),
42
- ( localizeWithPath(
43
- 'vs/workbench/contrib/testing/common/configuration',
44
- 'testing.automaticallyOpenPeekView.failureInVisibleDocument',
45
- "Open automatically when a test fails in a visible document."
46
- )),
47
- ( localizeWithPath(
48
- 'vs/workbench/contrib/testing/common/configuration',
49
- 'testing.automaticallyOpenPeekView.never',
50
- "Never automatically open."
51
- )),
52
- ],
53
- },
54
- ["testing.showAllMessages" ]: {
55
- description: ( localizeWithPath(
56
- 'vs/workbench/contrib/testing/common/configuration',
57
- 'testing.showAllMessages',
58
- "Controls whether to show messages from all test runs."
59
- )),
60
- type: 'boolean',
61
- default: false,
62
- },
63
- ["testing.automaticallyOpenPeekViewDuringAutoRun" ]: {
64
- description: ( localizeWithPath(
65
- 'vs/workbench/contrib/testing/common/configuration',
66
- 'testing.automaticallyOpenPeekViewDuringContinuousRun',
67
- "Controls whether to automatically open the Peek view during continuous run mode."
68
- )),
69
- type: 'boolean',
70
- default: false,
71
- },
72
- ["testing.countBadge" ]: {
73
- description: ( localizeWithPath(
74
- 'vs/workbench/contrib/testing/common/configuration',
75
- 'testing.countBadge',
76
- 'Controls the count badge on the Testing icon on the Activity Bar.'
77
- )),
78
- enum: [
79
- "failed" ,
80
- "off" ,
81
- "passed" ,
82
- "skipped" ,
83
- ],
84
- enumDescriptions: [
85
- ( localizeWithPath(
86
- 'vs/workbench/contrib/testing/common/configuration',
87
- 'testing.countBadge.failed',
88
- 'Show the number of failed tests'
89
- )),
90
- ( localizeWithPath(
91
- 'vs/workbench/contrib/testing/common/configuration',
92
- 'testing.countBadge.off',
93
- 'Disable the testing count badge'
94
- )),
95
- ( localizeWithPath(
96
- 'vs/workbench/contrib/testing/common/configuration',
97
- 'testing.countBadge.passed',
98
- 'Show the number of passed tests'
99
- )),
100
- ( localizeWithPath(
101
- 'vs/workbench/contrib/testing/common/configuration',
102
- 'testing.countBadge.skipped',
103
- 'Show the number of skipped tests'
104
- )),
105
- ],
106
- default: "failed" ,
107
- },
108
- ["testing.followRunningTest" ]: {
109
- description: ( localizeWithPath(
110
- 'vs/workbench/contrib/testing/common/configuration',
111
- 'testing.followRunningTest',
112
- 'Controls whether the running test should be followed in the Test Explorer view.'
113
- )),
114
- type: 'boolean',
115
- default: true,
116
- },
117
- ["testing.defaultGutterClickAction" ]: {
118
- description: ( localizeWithPath(
119
- 'vs/workbench/contrib/testing/common/configuration',
120
- 'testing.defaultGutterClickAction',
121
- 'Controls the action to take when left-clicking on a test decoration in the gutter.'
122
- )),
123
- enum: [
124
- "run" ,
125
- "debug" ,
126
- "runWithCoverage" ,
127
- "contextMenu" ,
128
- ],
129
- enumDescriptions: [
130
- ( localizeWithPath(
131
- 'vs/workbench/contrib/testing/common/configuration',
132
- 'testing.defaultGutterClickAction.run',
133
- 'Run the test.'
134
- )),
135
- ( localizeWithPath(
136
- 'vs/workbench/contrib/testing/common/configuration',
137
- 'testing.defaultGutterClickAction.debug',
138
- 'Debug the test.'
139
- )),
140
- ( localizeWithPath(
141
- 'vs/workbench/contrib/testing/common/configuration',
142
- 'testing.defaultGutterClickAction.coverage',
143
- 'Run the test with coverage.'
144
- )),
145
- ( localizeWithPath(
146
- 'vs/workbench/contrib/testing/common/configuration',
147
- 'testing.defaultGutterClickAction.contextMenu',
148
- 'Open the context menu for more options.'
149
- )),
150
- ],
151
- default: "run" ,
152
- },
153
- ["testing.gutterEnabled" ]: {
154
- description: ( localizeWithPath(
155
- 'vs/workbench/contrib/testing/common/configuration',
156
- 'testing.gutterEnabled',
157
- 'Controls whether test decorations are shown in the editor gutter.'
158
- )),
159
- type: 'boolean',
160
- default: true,
161
- },
162
- ["testing.saveBeforeTest" ]: {
163
- description: ( localizeWithPath(
164
- 'vs/workbench/contrib/testing/common/configuration',
165
- 'testing.saveBeforeTest',
166
- 'Control whether save all dirty editors before running a test.'
167
- )),
168
- type: 'boolean',
169
- default: true,
170
- },
171
- ["testing.openTesting" ]: {
172
- enum: [
173
- "neverOpen" ,
174
- "openOnTestStart" ,
175
- "openOnTestFailure" ,
176
- "openExplorerOnTestStart" ,
177
- ],
178
- enumDescriptions: [
179
- ( localizeWithPath(
180
- 'vs/workbench/contrib/testing/common/configuration',
181
- 'testing.openTesting.neverOpen',
182
- 'Never automatically open the testing views'
183
- )),
184
- ( localizeWithPath(
185
- 'vs/workbench/contrib/testing/common/configuration',
186
- 'testing.openTesting.openOnTestStart',
187
- 'Open the test results view when tests start'
188
- )),
189
- ( localizeWithPath(
190
- 'vs/workbench/contrib/testing/common/configuration',
191
- 'testing.openTesting.openOnTestFailure',
192
- 'Open the test result view on any test failure'
193
- )),
194
- ( localizeWithPath(
195
- 'vs/workbench/contrib/testing/common/configuration',
196
- 'testing.openTesting.openExplorerOnTestStart',
197
- 'Open the test explorer when tests start'
198
- )),
199
- ],
200
- default: 'openOnTestStart',
201
- description: ( localizeWithPath(
202
- 'vs/workbench/contrib/testing/common/configuration',
203
- 'testing.openTesting',
204
- "Controls when the testing view should open."
205
- ))
206
- },
207
- ["testing.alwaysRevealTestOnStateChange" ]: {
208
- markdownDescription: ( localizeWithPath(
209
- 'vs/workbench/contrib/testing/common/configuration',
210
- 'testing.alwaysRevealTestOnStateChange',
211
- "Always reveal the executed test when `#testing.followRunningTest#` is on. If this setting is turned off, only failed tests will be revealed."
212
- )),
213
- type: 'boolean',
214
- default: false,
215
- },
216
- ["testing.showCoverageInExplorer" ]: {
217
- description: ( localizeWithPath(
218
- 'vs/workbench/contrib/testing/common/configuration',
219
- 'testing.ShowCoverageInExplorer',
220
- "Whether test coverage should be down in the File Explorer view."
221
- )),
222
- type: 'boolean',
223
- default: true,
224
- },
225
- ["testing.displayedCoveragePercent" ]: {
226
- markdownDescription: ( localizeWithPath(
227
- 'vs/workbench/contrib/testing/common/configuration',
228
- 'testing.displayedCoveragePercent',
229
- "Configures what percentage is displayed by default for test coverage."
230
- )),
231
- default: "totalCoverage" ,
232
- enum: [
233
- "totalCoverage" ,
234
- "statement" ,
235
- "minimum" ,
236
- ],
237
- enumDescriptions: [
238
- ( localizeWithPath(
239
- 'vs/workbench/contrib/testing/common/configuration',
240
- 'testing.displayedCoveragePercent.totalCoverage',
241
- 'A calculation of the combined statement, function, and branch coverage.'
242
- )),
243
- ( localizeWithPath(
244
- 'vs/workbench/contrib/testing/common/configuration',
245
- 'testing.displayedCoveragePercent.statement',
246
- 'The statement coverage.'
247
- )),
248
- ( localizeWithPath(
249
- 'vs/workbench/contrib/testing/common/configuration',
250
- 'testing.displayedCoveragePercent.minimum',
251
- 'The minimum of statement, function, and branch coverage.'
252
- )),
253
- ],
254
- },
255
- ["testing.coverageBarThresholds" ]: {
256
- markdownDescription: ( localizeWithPath(
257
- 'vs/workbench/contrib/testing/common/configuration',
258
- 'testing.coverageBarThresholds',
259
- "Configures the colors used for percentages in test coverage bars."
260
- )),
261
- default: { red: 0, yellow: 60, green: 90 },
262
- properties: {
263
- red: { type: 'number', minimum: 0, maximum: 100, default: 0 },
264
- yellow: { type: 'number', minimum: 0, maximum: 100, default: 60 },
265
- green: { type: 'number', minimum: 0, maximum: 100, default: 90 },
266
- },
267
- },
268
- }
269
- };
270
- const getTestingConfiguration = (config, key) => config.getValue(key);
271
- const observeTestingConfiguration = (config, key) => observableFromEvent(config.onDidChangeConfiguration, () => getTestingConfiguration(config, key));
272
-
273
- export { getTestingConfiguration, observeTestingConfiguration, testingConfiguration };
@@ -1,59 +0,0 @@
1
- import { stripIcons } from 'vscode/vscode/vs/base/common/iconLabels';
2
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
-
4
- const testStateNames = {
5
- [6 ]: ( localizeWithPath(
6
- 'vs/workbench/contrib/testing/common/constants',
7
- 'testState.errored',
8
- 'Errored'
9
- )),
10
- [4 ]: ( localizeWithPath(
11
- 'vs/workbench/contrib/testing/common/constants',
12
- 'testState.failed',
13
- 'Failed'
14
- )),
15
- [3 ]: ( localizeWithPath(
16
- 'vs/workbench/contrib/testing/common/constants',
17
- 'testState.passed',
18
- 'Passed'
19
- )),
20
- [1 ]: ( localizeWithPath(
21
- 'vs/workbench/contrib/testing/common/constants',
22
- 'testState.queued',
23
- 'Queued'
24
- )),
25
- [2 ]: ( localizeWithPath(
26
- 'vs/workbench/contrib/testing/common/constants',
27
- 'testState.running',
28
- 'Running'
29
- )),
30
- [5 ]: ( localizeWithPath(
31
- 'vs/workbench/contrib/testing/common/constants',
32
- 'testState.skipped',
33
- 'Skipped'
34
- )),
35
- [0 ]: ( localizeWithPath(
36
- 'vs/workbench/contrib/testing/common/constants',
37
- 'testState.unset',
38
- 'Not yet run'
39
- )),
40
- };
41
- const labelForTestInState = (label, state) => ( localizeWithPath('vs/workbench/contrib/testing/common/constants', {
42
- key: 'testing.treeElementLabel',
43
- comment: ['label then the unit tests state, for example "Addition Tests (Running)"'],
44
- }, '{0} ({1})', stripIcons(label), testStateNames[state]));
45
- const testConfigurationGroupNames = {
46
- [4 ]: ( localizeWithPath(
47
- 'vs/workbench/contrib/testing/common/constants',
48
- 'testGroup.debug',
49
- 'Debug'
50
- )),
51
- [2 ]: ( localizeWithPath('vs/workbench/contrib/testing/common/constants', 'testGroup.run', 'Run')),
52
- [8 ]: ( localizeWithPath(
53
- 'vs/workbench/contrib/testing/common/constants',
54
- 'testGroup.coverage',
55
- 'Coverage'
56
- )),
57
- };
58
-
59
- export { labelForTestInState, testConfigurationGroupNames };
@@ -1,129 +0,0 @@
1
- import { Emitter } from 'vscode/vscode/vs/base/common/event';
2
- import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
3
- import { ResourceMap } from 'vscode/vscode/vs/base/common/map';
4
- import { AbstractIncrementalTestCollection } from 'vscode/vscode/vs/workbench/contrib/testing/common/testTypes';
5
-
6
- class MainThreadTestCollection extends AbstractIncrementalTestCollection {
7
- get busyProviders() {
8
- return this.busyControllerCount;
9
- }
10
- get rootItems() {
11
- return this.roots;
12
- }
13
- get all() {
14
- return this.getIterator();
15
- }
16
- get rootIds() {
17
- return ( Iterable.map(( this.roots.values()), r => r.item.extId));
18
- }
19
- constructor(uriIdentityService, expandActual) {
20
- super(uriIdentityService);
21
- this.expandActual = expandActual;
22
- this.testsByUrl = ( new ResourceMap());
23
- this.busyProvidersChangeEmitter = ( new Emitter());
24
- this.expandPromises = ( new WeakMap());
25
- this.onBusyProvidersChange = this.busyProvidersChangeEmitter.event;
26
- this.changeCollector = {
27
- add: node => {
28
- if (!node.item.uri) {
29
- return;
30
- }
31
- const s = this.testsByUrl.get(node.item.uri);
32
- if (!s) {
33
- this.testsByUrl.set(node.item.uri, ( new Set([node])));
34
- }
35
- else {
36
- s.add(node);
37
- }
38
- },
39
- remove: node => {
40
- if (!node.item.uri) {
41
- return;
42
- }
43
- const s = this.testsByUrl.get(node.item.uri);
44
- if (!s) {
45
- return;
46
- }
47
- s.delete(node);
48
- if (s.size === 0) {
49
- this.testsByUrl.delete(node.item.uri);
50
- }
51
- },
52
- };
53
- }
54
- expand(testId, levels) {
55
- const test = this.items.get(testId);
56
- if (!test) {
57
- return Promise.resolve();
58
- }
59
- const existing = this.expandPromises.get(test);
60
- if (existing && existing.pendingLvl >= levels) {
61
- return existing.prom;
62
- }
63
- const prom = this.expandActual(test.item.extId, levels);
64
- const record = { doneLvl: existing ? existing.doneLvl : -1, pendingLvl: levels, prom };
65
- this.expandPromises.set(test, record);
66
- return prom.then(() => {
67
- record.doneLvl = levels;
68
- });
69
- }
70
- getNodeById(id) {
71
- return this.items.get(id);
72
- }
73
- getNodeByUrl(uri) {
74
- return this.testsByUrl.get(uri) || Iterable.empty();
75
- }
76
- getReviverDiff() {
77
- const ops = [{ op: 4 , amount: this.pendingRootCount }];
78
- const queue = [this.rootIds];
79
- while (queue.length) {
80
- for (const child of queue.pop()) {
81
- const item = this.items.get(child);
82
- ops.push({
83
- op: 0 ,
84
- item: {
85
- controllerId: item.controllerId,
86
- expand: item.expand,
87
- item: item.item,
88
- }
89
- });
90
- queue.push(item.children);
91
- }
92
- }
93
- return ops;
94
- }
95
- apply(diff) {
96
- const prevBusy = this.busyControllerCount;
97
- super.apply(diff);
98
- if (prevBusy !== this.busyControllerCount) {
99
- this.busyProvidersChangeEmitter.fire(this.busyControllerCount);
100
- }
101
- }
102
- clear() {
103
- const ops = [];
104
- for (const root of this.roots) {
105
- ops.push({ op: 3 , itemId: root.item.extId });
106
- }
107
- this.roots.clear();
108
- this.items.clear();
109
- return ops;
110
- }
111
- createItem(internal) {
112
- return { ...internal, children: ( new Set()) };
113
- }
114
- createChangeCollector() {
115
- return this.changeCollector;
116
- }
117
- *getIterator() {
118
- const queue = [this.rootIds];
119
- while (queue.length) {
120
- for (const id of queue.pop()) {
121
- const node = this.getNodeById(id);
122
- yield node;
123
- queue.push(node.children);
124
- }
125
- }
126
- }
127
- }
128
-
129
- export { MainThreadTestCollection };
@@ -1,48 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { Iterable } from 'vscode/vscode/vs/base/common/iterator';
3
- import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
4
- import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
5
- import { MutableObservableValue } from 'vscode/vscode/vs/workbench/contrib/testing/common/observableValue';
6
- import { StoredValue } from 'vscode/vscode/vs/workbench/contrib/testing/common/storedValue';
7
-
8
- let TestExclusions = class TestExclusions extends Disposable {
9
- constructor(storageService) {
10
- super();
11
- this.storageService = storageService;
12
- this.excluded = this._register(MutableObservableValue.stored(this._register(( new StoredValue({
13
- key: 'excludedTestItems',
14
- scope: 1 ,
15
- target: 1 ,
16
- serialization: {
17
- deserialize: v => ( new Set(JSON.parse(v))),
18
- serialize: v => JSON.stringify([...v])
19
- },
20
- }, this.storageService))), ( new Set())));
21
- this.onTestExclusionsChanged = this.excluded.onDidChange;
22
- }
23
- get hasAny() {
24
- return this.excluded.value.size > 0;
25
- }
26
- get all() {
27
- return this.excluded.value;
28
- }
29
- toggle(test, exclude) {
30
- if (exclude !== true && ( this.excluded.value.has(test.item.extId))) {
31
- this.excluded.value = ( new Set(Iterable.filter(this.excluded.value, e => e !== test.item.extId)));
32
- }
33
- else if (exclude !== false && !( this.excluded.value.has(test.item.extId))) {
34
- this.excluded.value = ( new Set([...this.excluded.value, test.item.extId]));
35
- }
36
- }
37
- contains(test) {
38
- return ( this.excluded.value.has(test.item.extId));
39
- }
40
- clear() {
41
- this.excluded.value = ( new Set());
42
- }
43
- };
44
- TestExclusions = ( __decorate([
45
- ( __param(0, IStorageService))
46
- ], TestExclusions));
47
-
48
- export { TestExclusions };