ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / src / vs / workbench / api / test / browser / mainThreadConfiguration.test.ts 240 строк · изменён 14 нояб., 04:52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
import assert from 'assert' ;
import * as sinon from 'sinon' ;
import { URI } from '../../../../base/common/uri.js' ;
import { Registry } from '../../../../platform/registry/common/platform.js' ;
import { Extensions, IConfigurationRegistry, ConfigurationScope } from '../../../../platform/configuration/common/configurationRegistry.js' ;
import { IWorkspaceContextService, WorkbenchState } from '../../../../platform/workspace/common/workspace.js' ;
import { TestInstantiationService } from '../../../../platform/instantiation/test/common/instantiationServiceMock.js' ;
MainThreadConfiguration
SingleProxyRPCProtocol
IConfigurationService ConfigurationTarget
WorkspaceService
IEnvironmentService
ensureNoDisposablesAreLeakedInTestSuite
proxy
instantiationService TestInstantiationService
target sinon SinonSpy
Registry Extensions Configuration
ConfigurationScope
ConfigurationScope
target sinon
instantiationService
instantiationService IConfigurationService WorkspaceService
instantiationService IConfigurationService sinon
instantiationService IConfigurationService sinon
instantiationService IConfigurationService target
instantiationService IEnvironmentService
isBuilt
instantiationService
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject resource
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject resource
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject resource
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject resource
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject ConfigurationTarget resource
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject ConfigurationTarget resource
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject ConfigurationTarget resource
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject resource
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject resource
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject resource
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject
assert ConfigurationTarget target args
instantiationService IWorkspaceContextService IWorkspaceContextService WorkbenchState
testObject MainThreadConfiguration instantiationService MainThreadConfiguration proxy
testObject resource
assert ConfigurationTarget target args
import
{
}
from
'../../browser/mainThreadConfiguration.js'
;
import
{
}
from
'../common/testRPCProtocol.js'
;
import
{
,
}
from
'../../../../platform/configuration/common/configuration.js'
;
import
{
}
from
'../../../services/configuration/browser/configurationService.js'
;
import
{
}
from
'../../../../platform/environment/common/environment.js'
;
import
{
}
from
'../../../../base/test/common/utils.js'
;
suite
(
'MainThreadConfiguration'
,
function
(
)
{
ensureNoDisposablesAreLeakedInTestSuite
(
)
;
const
=
{
$initializeConfiguration
:
(
)
=>
{
}
}
;
let
:
;
let
:
.
;
suiteSetup
(
(
)
=>
{
.
as < IConfigurationRegistry>
(
.
)
.
registerConfiguration
(
{
'id'
:
'extHostConfiguration'
,
'title'
:
'a'
,
'type'
:
'object'
,
'properties'
:
{
'extHostConfiguration.resource'
:
{
'description'
:
'extHostConfiguration.resource'
,
'type'
:
'boolean'
,
'default'
:
true
,
'scope'
:
.
RESOURCE
}
,
'extHostConfiguration.window'
:
{
'description'
:
'extHostConfiguration.resource'
,
'type'
:
'boolean'
,
'default'
:
true
,
'scope'
:
.
WINDOW
}
}
}
)
;
}
)
;
setup
(
(
)
=>
{
=
.
spy
(
)
;
=
new
TestInstantiationService
(
)
;
.
stub
(
,
)
;
.
stub
(
,
'onDidUpdateConfiguration'
,
.
mock
(
)
)
;
.
stub
(
,
'onDidChangeConfiguration'
,
.
mock
(
)
)
;
.
stub
(
,
'updateValue'
,
)
;
.
stub
(
,
{
:
false
}
)
;
}
)
;
teardown
(
(
)
=>
{
.
dispose
(
)
;
}
)
;
test
(
'update resource configuration without configuration target defaults to workspace in multi root workspace when no resource is provided'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
WORKSPACE
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$updateConfigurationOption
(
null
,
'extHostConfiguration.resource'
,
'value'
,
undefined
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'update resource configuration without configuration target defaults to workspace in folder workspace when resource is provider'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
FOLDER
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$updateConfigurationOption
(
null
,
'extHostConfiguration.resource'
,
'value'
,
{
:
URI
.
file
(
'abc'
)
}
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'update resource configuration without configuration target defaults to workspace in folder workspace when no resource is provider'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
FOLDER
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$updateConfigurationOption
(
null
,
'extHostConfiguration.resource'
,
'value'
,
undefined
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'update window configuration without configuration target defaults to workspace in multi root workspace when no resource is provided'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
WORKSPACE
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$updateConfigurationOption
(
null
,
'extHostConfiguration.window'
,
'value'
,
undefined
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'update window configuration without configuration target defaults to workspace in multi root workspace when resource is provided'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
WORKSPACE
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$updateConfigurationOption
(
null
,
'extHostConfiguration.window'
,
'value'
,
{
:
URI
.
file
(
'abc'
)
}
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'update window configuration without configuration target defaults to workspace in folder workspace when resource is provider'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
FOLDER
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$updateConfigurationOption
(
null
,
'extHostConfiguration.window'
,
'value'
,
{
:
URI
.
file
(
'abc'
)
}
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'update window configuration without configuration target defaults to workspace in folder workspace when no resource is provider'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
FOLDER
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$updateConfigurationOption
(
null
,
'extHostConfiguration.window'
,
'value'
,
undefined
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'update resource configuration without configuration target defaults to folder'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
WORKSPACE
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$updateConfigurationOption
(
null
,
'extHostConfiguration.resource'
,
'value'
,
{
:
URI
.
file
(
'abc'
)
}
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE_FOLDER
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'update configuration with user configuration target'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
FOLDER
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$updateConfigurationOption
(
.
USER
,
'extHostConfiguration.window'
,
'value'
,
{
:
URI
.
file
(
'abc'
)
}
,
undefined
)
;
.
strictEqual
(
.
USER
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'update configuration with workspace configuration target'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
FOLDER
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$updateConfigurationOption
(
.
WORKSPACE
,
'extHostConfiguration.window'
,
'value'
,
{
:
URI
.
file
(
'abc'
)
}
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'update configuration with folder configuration target'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
FOLDER
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$updateConfigurationOption
(
.
WORKSPACE_FOLDER
,
'extHostConfiguration.window'
,
'value'
,
{
:
URI
.
file
(
'abc'
)
}
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE_FOLDER
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'remove resource configuration without configuration target defaults to workspace in multi root workspace when no resource is provided'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
WORKSPACE
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$removeConfigurationOption
(
null
,
'extHostConfiguration.resource'
,
undefined
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'remove resource configuration without configuration target defaults to workspace in folder workspace when resource is provider'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
FOLDER
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$removeConfigurationOption
(
null
,
'extHostConfiguration.resource'
,
{
:
URI
.
file
(
'abc'
)
}
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'remove resource configuration without configuration target defaults to workspace in folder workspace when no resource is provider'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
FOLDER
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$removeConfigurationOption
(
null
,
'extHostConfiguration.resource'
,
undefined
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'remove window configuration without configuration target defaults to workspace in multi root workspace when no resource is provided'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
WORKSPACE
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$removeConfigurationOption
(
null
,
'extHostConfiguration.window'
,
undefined
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'remove window configuration without configuration target defaults to workspace in multi root workspace when resource is provided'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
WORKSPACE
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$removeConfigurationOption
(
null
,
'extHostConfiguration.window'
,
{
:
URI
.
file
(
'abc'
)
}
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'remove window configuration without configuration target defaults to workspace in folder workspace when resource is provider'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
FOLDER
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$removeConfigurationOption
(
null
,
'extHostConfiguration.window'
,
{
:
URI
.
file
(
'abc'
)
}
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'remove window configuration without configuration target defaults to workspace in folder workspace when no resource is provider'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
FOLDER
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$removeConfigurationOption
(
null
,
'extHostConfiguration.window'
,
undefined
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE
,
.
[
0
]
[
3
]
)
;
}
)
;
test
(
'remove configuration without configuration target defaults to folder'
,
function
(
)
{
.
stub
(
,
<
>
{
getWorkbenchState
:
(
)
=>
.
WORKSPACE
}
)
;
const
:
=
.
createInstance
(
,
SingleProxyRPCProtocol
(
)
)
;
.
$removeConfigurationOption
(
null
,
'extHostConfiguration.resource'
,
{
:
URI
.
file
(
'abc'
)
}
,
undefined
)
;
.
strictEqual
(
.
WORKSPACE_FOLDER
,
.
[
0
]
[
3
]
)
;
}
)
;
}
)
;