Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
edd37076
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
edd37076
编写于
12月 18, 2020
作者:
A
Alexandru Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adopt new mocha types
上级
f74ad969
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
25 addition
and
33 deletion
+25
-33
extensions/vscode-notebook-tests/src/notebook.test.ts
extensions/vscode-notebook-tests/src/notebook.test.ts
+1
-2
src/vs/base/test/common/async.test.ts
src/vs/base/test/common/async.test.ts
+3
-3
src/vs/base/test/common/filters.perf.test.ts
src/vs/base/test/common/filters.perf.test.ts
+1
-1
src/vs/base/test/common/paging.test.ts
src/vs/base/test/common/paging.test.ts
+0
-1
src/vs/base/test/common/skipList.test.ts
src/vs/base/test/common/skipList.test.ts
+1
-2
src/vs/base/test/common/types.test.ts
src/vs/base/test/common/types.test.ts
+2
-2
src/vs/base/test/common/uri.test.ts
src/vs/base/test/common/uri.test.ts
+2
-4
src/vs/base/test/common/utils.ts
src/vs/base/test/common/utils.ts
+1
-1
src/vs/base/test/node/keytar.test.ts
src/vs/base/test/node/keytar.test.ts
+0
-1
src/vs/editor/test/common/services/editorSimpleWorker.test.ts
...vs/editor/test/common/services/editorSimpleWorker.test.ts
+0
-1
src/vs/editor/test/common/viewModel/splitLinesCollection.test.ts
...editor/test/common/viewModel/splitLinesCollection.test.ts
+0
-1
src/vs/workbench/contrib/files/test/browser/textFileEditor.test.ts
...rkbench/contrib/files/test/browser/textFileEditor.test.ts
+1
-1
src/vs/workbench/services/extensions/node/proxyResolver.ts
src/vs/workbench/services/extensions/node/proxyResolver.ts
+1
-1
src/vs/workbench/services/textfile/test/browser/textFileEditorModel.test.ts
...ervices/textfile/test/browser/textFileEditorModel.test.ts
+5
-5
src/vs/workbench/test/browser/api/extHostApiCommands.test.ts
src/vs/workbench/test/browser/api/extHostApiCommands.test.ts
+6
-6
src/vs/workbench/test/browser/parts/editor/editorPane.test.ts
...vs/workbench/test/browser/parts/editor/editorPane.test.ts
+1
-1
未找到文件。
extensions/vscode-notebook-tests/src/notebook.test.ts
浏览文件 @
edd37076
...
@@ -1272,8 +1272,7 @@ suite('regression', () => {
...
@@ -1272,8 +1272,7 @@ suite('regression', () => {
assert
.
strictEqual
(
vscode
.
window
.
activeNotebookEditor
!
.
document
.
uri
.
toString
(),
resource
.
toString
());
assert
.
strictEqual
(
vscode
.
window
.
activeNotebookEditor
!
.
document
.
uri
.
toString
(),
resource
.
toString
());
});
});
test
(
'
Cannot open notebook from cell-uri with vscode.open-command
'
,
async
function
()
{
test
.
skip
(
'
Cannot open notebook from cell-uri with vscode.open-command
'
,
async
function
()
{
this
.
skip
();
assertInitalState
();
assertInitalState
();
const
resource
=
await
createRandomFile
(
''
,
undefined
,
'
first
'
,
'
.vsctestnb
'
);
const
resource
=
await
createRandomFile
(
''
,
undefined
,
'
first
'
,
'
.vsctestnb
'
);
await
vscode
.
commands
.
executeCommand
(
'
vscode.openWith
'
,
resource
,
'
notebookCoreTest
'
);
await
vscode
.
commands
.
executeCommand
(
'
vscode.openWith
'
,
resource
,
'
notebookCoreTest
'
);
...
...
src/vs/base/test/common/async.test.ts
浏览文件 @
edd37076
...
@@ -576,12 +576,12 @@ suite('Async', () => {
...
@@ -576,12 +576,12 @@ suite('Async', () => {
sequentializer
.
setPending
(
2
,
async
.
timeout
(
1
));
sequentializer
.
setPending
(
2
,
async
.
timeout
(
1
));
assert
.
ok
(
sequentializer
.
hasPending
());
assert
.
ok
(
sequentializer
.
hasPending
());
assert
.
ok
(
sequentializer
.
hasPending
(
2
));
assert
.
ok
(
sequentializer
.
hasPending
(
2
));
assert
.
ok
(
!
sequentializer
.
hasPending
(
1
)
);
assert
.
strictEqual
(
sequentializer
.
hasPending
(
1
),
false
);
assert
.
ok
(
sequentializer
.
pending
);
assert
.
ok
(
sequentializer
.
pending
);
await
async
.
timeout
(
2
);
await
async
.
timeout
(
2
);
assert
.
ok
(
!
sequentializer
.
hasPending
()
);
assert
.
strictEqual
(
sequentializer
.
hasPending
(),
false
);
assert
.
ok
(
!
sequentializer
.
hasPending
(
2
)
);
assert
.
strictEqual
(
sequentializer
.
hasPending
(
2
),
false
);
assert
.
ok
(
!
sequentializer
.
pending
);
assert
.
ok
(
!
sequentializer
.
pending
);
});
});
...
...
src/vs/base/test/common/filters.perf.test.ts
浏览文件 @
edd37076
...
@@ -9,7 +9,7 @@ const patterns = ['cci', 'ida', 'pos', 'CCI', 'enbled', 'callback', 'gGame', 'co
...
@@ -9,7 +9,7 @@ const patterns = ['cci', 'ida', 'pos', 'CCI', 'enbled', 'callback', 'gGame', 'co
const
_enablePerf
=
false
;
const
_enablePerf
=
false
;
function
perfSuite
(
name
:
string
,
callback
:
(
this
:
Mocha
.
ISuiteCallbackContext
)
=>
void
)
{
function
perfSuite
(
name
:
string
,
callback
:
(
this
:
Mocha
.
Suite
)
=>
void
)
{
if
(
_enablePerf
)
{
if
(
_enablePerf
)
{
suite
(
name
,
callback
);
suite
(
name
,
callback
);
}
}
...
...
src/vs/base/test/common/paging.test.ts
浏览文件 @
edd37076
...
@@ -101,7 +101,6 @@ suite('PagedModel', () => {
...
@@ -101,7 +101,6 @@ suite('PagedModel', () => {
test
(
'
preemptive cancellation works
'
,
async
function
()
{
test
(
'
preemptive cancellation works
'
,
async
function
()
{
const
pager
=
new
TestPager
(()
=>
{
const
pager
=
new
TestPager
(()
=>
{
assert
(
false
);
assert
(
false
);
return
Promise
.
resolve
([]);
});
});
const
model
=
new
PagedModel
(
pager
);
const
model
=
new
PagedModel
(
pager
);
...
...
src/vs/base/test/common/skipList.test.ts
浏览文件 @
edd37076
...
@@ -141,8 +141,7 @@ suite('SkipList', function () {
...
@@ -141,8 +141,7 @@ suite('SkipList', function () {
}
}
test
(
'
perf
'
,
function
()
{
test
.
skip
(
'
perf
'
,
function
()
{
this
.
skip
();
// data
// data
const
max
=
2
**
16
;
const
max
=
2
**
16
;
...
...
src/vs/base/test/common/types.test.ts
浏览文件 @
edd37076
...
@@ -57,7 +57,7 @@ suite('Types', () => {
...
@@ -57,7 +57,7 @@ suite('Types', () => {
assert
(
!
types
.
isObject
(
/test/
));
assert
(
!
types
.
isObject
(
/test/
));
assert
(
!
types
.
isObject
(
new
RegExp
(
''
)));
assert
(
!
types
.
isObject
(
new
RegExp
(
''
)));
assert
(
!
types
.
isFunction
(
new
Date
()));
assert
(
!
types
.
isFunction
(
new
Date
()));
assert
(
!
types
.
isObject
(
assert
)
);
assert
.
strictEqual
(
types
.
isObject
(
assert
),
false
);
assert
(
!
types
.
isObject
(
function
foo
()
{
}));
assert
(
!
types
.
isObject
(
function
foo
()
{
}));
assert
(
types
.
isObject
({}));
assert
(
types
.
isObject
({}));
...
@@ -75,7 +75,7 @@ suite('Types', () => {
...
@@ -75,7 +75,7 @@ suite('Types', () => {
assert
(
!
types
.
isEmptyObject
(
/test/
));
assert
(
!
types
.
isEmptyObject
(
/test/
));
assert
(
!
types
.
isEmptyObject
(
new
RegExp
(
''
)));
assert
(
!
types
.
isEmptyObject
(
new
RegExp
(
''
)));
assert
(
!
types
.
isEmptyObject
(
new
Date
()));
assert
(
!
types
.
isEmptyObject
(
new
Date
()));
assert
(
!
types
.
isEmptyObject
(
assert
)
);
assert
.
strictEqual
(
types
.
isEmptyObject
(
assert
),
false
);
assert
(
!
types
.
isEmptyObject
(
function
foo
()
{
/**/
}));
assert
(
!
types
.
isEmptyObject
(
function
foo
()
{
/**/
}));
assert
(
!
types
.
isEmptyObject
({
foo
:
'
bar
'
}));
assert
(
!
types
.
isEmptyObject
({
foo
:
'
bar
'
}));
...
...
src/vs/base/test/common/uri.test.ts
浏览文件 @
edd37076
...
@@ -444,8 +444,7 @@ suite('URI', () => {
...
@@ -444,8 +444,7 @@ suite('URI', () => {
assert
.
equal
(
URI
.
parse
(
'
file://some/%A0.txt
'
),
'
file://some/%25A0.txt
'
);
assert
.
equal
(
URI
.
parse
(
'
file://some/%A0.txt
'
),
'
file://some/%25A0.txt
'
);
});
});
test
(
'
Links in markdown are broken if url contains encoded parameters #79474
'
,
function
()
{
test
.
skip
(
'
Links in markdown are broken if url contains encoded parameters #79474
'
,
function
()
{
this
.
skip
();
let
strIn
=
'
https://myhost.com/Redirect?url=http%3A%2F%2Fwww.bing.com%3Fsearch%3Dtom
'
;
let
strIn
=
'
https://myhost.com/Redirect?url=http%3A%2F%2Fwww.bing.com%3Fsearch%3Dtom
'
;
let
uri1
=
URI
.
parse
(
strIn
);
let
uri1
=
URI
.
parse
(
strIn
);
let
strOut
=
uri1
.
toString
();
let
strOut
=
uri1
.
toString
();
...
@@ -459,8 +458,7 @@ suite('URI', () => {
...
@@ -459,8 +458,7 @@ suite('URI', () => {
assert
.
equal
(
strIn
,
strOut
);
// fails here!!
assert
.
equal
(
strIn
,
strOut
);
// fails here!!
});
});
test
(
'
Uri#parse can break path-component #45515
'
,
function
()
{
test
.
skip
(
'
Uri#parse can break path-component #45515
'
,
function
()
{
this
.
skip
();
let
strIn
=
'
https://firebasestorage.googleapis.com/v0/b/brewlangerie.appspot.com/o/products%2FzVNZkudXJyq8bPGTXUxx%2FBetterave-Sesame.jpg?alt=media&token=0b2310c4-3ea6-4207-bbde-9c3710ba0437
'
;
let
strIn
=
'
https://firebasestorage.googleapis.com/v0/b/brewlangerie.appspot.com/o/products%2FzVNZkudXJyq8bPGTXUxx%2FBetterave-Sesame.jpg?alt=media&token=0b2310c4-3ea6-4207-bbde-9c3710ba0437
'
;
let
uri1
=
URI
.
parse
(
strIn
);
let
uri1
=
URI
.
parse
(
strIn
);
let
strOut
=
uri1
.
toString
();
let
strOut
=
uri1
.
toString
();
...
...
src/vs/base/test/common/utils.ts
浏览文件 @
edd37076
...
@@ -60,7 +60,7 @@ export function suiteRepeat(n: number, description: string, callback: (this: any
...
@@ -60,7 +60,7 @@ export function suiteRepeat(n: number, description: string, callback: (this: any
}
}
}
}
export
function
testRepeat
(
n
:
number
,
description
:
string
,
callback
:
(
this
:
any
,
done
:
MochaDone
)
=>
any
):
void
{
export
function
testRepeat
(
n
:
number
,
description
:
string
,
callback
:
(
this
:
any
)
=>
any
):
void
{
for
(
let
i
=
0
;
i
<
n
;
i
++
)
{
for
(
let
i
=
0
;
i
<
n
;
i
++
)
{
test
(
`
${
description
}
(iteration
${
i
}
)`
,
callback
);
test
(
`
${
description
}
(iteration
${
i
}
)`
,
callback
);
}
}
...
...
src/vs/base/test/node/keytar.test.ts
浏览文件 @
edd37076
...
@@ -10,7 +10,6 @@ suite('Keytar', () => {
...
@@ -10,7 +10,6 @@ suite('Keytar', () => {
test
(
'
loads and is functional
'
,
function
(
done
)
{
test
(
'
loads and is functional
'
,
function
(
done
)
{
if
(
platform
.
isLinux
)
{
if
(
platform
.
isLinux
)
{
// Skip test due to set up issue with Travis.
// Skip test due to set up issue with Travis.
this
.
skip
();
return
;
return
;
}
}
(
async
()
=>
{
(
async
()
=>
{
...
...
src/vs/editor/test/common/services/editorSimpleWorker.test.ts
浏览文件 @
edd37076
...
@@ -165,7 +165,6 @@ suite('EditorSimpleWorker', () => {
...
@@ -165,7 +165,6 @@ suite('EditorSimpleWorker', () => {
return
worker
.
textualSuggest
([
model
.
uri
.
toString
()],
'
f
'
,
'
[a-z]+
'
,
'
img
'
).
then
((
result
)
=>
{
return
worker
.
textualSuggest
([
model
.
uri
.
toString
()],
'
f
'
,
'
[a-z]+
'
,
'
img
'
).
then
((
result
)
=>
{
if
(
!
result
)
{
if
(
!
result
)
{
assert
.
ok
(
false
);
assert
.
ok
(
false
);
return
;
}
}
assert
.
equal
(
result
.
words
.
length
,
1
);
assert
.
equal
(
result
.
words
.
length
,
1
);
assert
.
equal
(
typeof
result
.
duration
,
'
number
'
);
assert
.
equal
(
typeof
result
.
duration
,
'
number
'
);
...
...
src/vs/editor/test/common/viewModel/splitLinesCollection.test.ts
浏览文件 @
edd37076
...
@@ -391,7 +391,6 @@ suite('SplitLinesCollection', () => {
...
@@ -391,7 +391,6 @@ suite('SplitLinesCollection', () => {
}
}
if
(
expected
===
null
)
{
if
(
expected
===
null
)
{
assert
.
ok
(
false
);
assert
.
ok
(
false
);
return
;
}
}
assert
.
equal
(
actual
.
content
,
expected
.
content
);
assert
.
equal
(
actual
.
content
,
expected
.
content
);
assert
.
equal
(
actual
.
minColumn
,
expected
.
minColumn
);
assert
.
equal
(
actual
.
minColumn
,
expected
.
minColumn
);
...
...
src/vs/workbench/contrib/files/test/browser/textFileEditor.test.ts
浏览文件 @
edd37076
...
@@ -87,7 +87,7 @@ suite('Files - TextFileEditor', () => {
...
@@ -87,7 +87,7 @@ suite('Files - TextFileEditor', () => {
return
viewStateTest
(
this
,
false
);
return
viewStateTest
(
this
,
false
);
});
});
async
function
viewStateTest
(
context
:
Mocha
.
ITestCallback
Context
,
restoreViewState
:
boolean
):
Promise
<
void
>
{
async
function
viewStateTest
(
context
:
Mocha
.
Context
,
restoreViewState
:
boolean
):
Promise
<
void
>
{
const
[
part
,
accessor
]
=
await
createPart
(
restoreViewState
);
const
[
part
,
accessor
]
=
await
createPart
(
restoreViewState
);
let
editor
=
await
accessor
.
editorService
.
openEditor
(
accessor
.
editorService
.
createEditorInput
({
resource
:
toResource
.
call
(
context
,
'
/path/index.txt
'
),
forceFile
:
true
}));
let
editor
=
await
accessor
.
editorService
.
openEditor
(
accessor
.
editorService
.
createEditorInput
({
resource
:
toResource
.
call
(
context
,
'
/path/index.txt
'
),
forceFile
:
true
}));
...
...
src/vs/workbench/services/extensions/node/proxyResolver.ts
浏览文件 @
edd37076
...
@@ -397,7 +397,7 @@ function tlsPatches(originals: typeof tls) {
...
@@ -397,7 +397,7 @@ function tlsPatches(originals: typeof tls) {
};
};
function
patch
(
original
:
typeof
tls
.
createSecureContext
):
typeof
tls
.
createSecureContext
{
function
patch
(
original
:
typeof
tls
.
createSecureContext
):
typeof
tls
.
createSecureContext
{
return
function
(
details
:
tls
.
SecureContextOptions
):
ReturnType
<
typeof
tls
.
createSecureContext
>
{
return
function
(
details
?
:
tls
.
SecureContextOptions
):
ReturnType
<
typeof
tls
.
createSecureContext
>
{
const
context
=
original
.
apply
(
null
,
arguments
as
any
);
const
context
=
original
.
apply
(
null
,
arguments
as
any
);
const
certs
=
(
details
as
any
).
_vscodeAdditionalCaCerts
;
const
certs
=
(
details
as
any
).
_vscodeAdditionalCaCerts
;
if
(
certs
)
{
if
(
certs
)
{
...
...
src/vs/workbench/services/textfile/test/browser/textFileEditorModel.test.ts
浏览文件 @
edd37076
...
@@ -182,7 +182,7 @@ suite('Files - TextFileEditorModel', () => {
...
@@ -182,7 +182,7 @@ suite('Files - TextFileEditorModel', () => {
await
model
.
save
({
force
:
true
});
await
model
.
save
({
force
:
true
});
assert
.
ok
(
savedEvent
);
assert
.
ok
(
savedEvent
);
assert
.
ok
(
!
model
.
isDirty
()
);
assert
.
strictEqual
(
model
.
isDirty
(),
false
);
model
.
dispose
();
model
.
dispose
();
assert
.
ok
(
!
accessor
.
modelService
.
getModel
(
model
.
resource
));
assert
.
ok
(
!
accessor
.
modelService
.
getModel
(
model
.
resource
));
...
@@ -373,7 +373,7 @@ suite('Files - TextFileEditorModel', () => {
...
@@ -373,7 +373,7 @@ suite('Files - TextFileEditorModel', () => {
assert
.
equal
(
accessor
.
workingCopyService
.
isDirty
(
model
.
resource
),
true
);
assert
.
equal
(
accessor
.
workingCopyService
.
isDirty
(
model
.
resource
),
true
);
await
model
.
revert
();
await
model
.
revert
();
assert
.
ok
(
!
model
.
isDirty
()
);
assert
.
strictEqual
(
model
.
isDirty
(),
false
);
assert
.
equal
(
model
.
textEditorModel
!
.
getValue
(),
'
Hello Html
'
);
assert
.
equal
(
model
.
textEditorModel
!
.
getValue
(),
'
Hello Html
'
);
assert
.
equal
(
eventCounter
,
1
);
assert
.
equal
(
eventCounter
,
1
);
...
@@ -406,7 +406,7 @@ suite('Files - TextFileEditorModel', () => {
...
@@ -406,7 +406,7 @@ suite('Files - TextFileEditorModel', () => {
assert
.
equal
(
accessor
.
workingCopyService
.
isDirty
(
model
.
resource
),
true
);
assert
.
equal
(
accessor
.
workingCopyService
.
isDirty
(
model
.
resource
),
true
);
await
model
.
revert
({
soft
:
true
});
await
model
.
revert
({
soft
:
true
});
assert
.
ok
(
!
model
.
isDirty
()
);
assert
.
strictEqual
(
model
.
isDirty
(),
false
);
assert
.
equal
(
model
.
textEditorModel
!
.
getValue
(),
'
foo
'
);
assert
.
equal
(
model
.
textEditorModel
!
.
getValue
(),
'
foo
'
);
assert
.
equal
(
eventCounter
,
1
);
assert
.
equal
(
eventCounter
,
1
);
...
@@ -453,7 +453,7 @@ suite('Files - TextFileEditorModel', () => {
...
@@ -453,7 +453,7 @@ suite('Files - TextFileEditorModel', () => {
assert
.
ok
(
model
.
isDirty
());
assert
.
ok
(
model
.
isDirty
());
await
model
.
revert
({
soft
:
true
});
await
model
.
revert
({
soft
:
true
});
assert
.
ok
(
!
model
.
isDirty
()
);
assert
.
strictEqual
(
model
.
isDirty
(),
false
);
model
.
onDidChangeDirty
(()
=>
eventCounter
++
);
model
.
onDidChangeDirty
(()
=>
eventCounter
++
);
...
@@ -470,7 +470,7 @@ suite('Files - TextFileEditorModel', () => {
...
@@ -470,7 +470,7 @@ suite('Files - TextFileEditorModel', () => {
assert
.
ok
(
workingCopyEvent
);
assert
.
ok
(
workingCopyEvent
);
model
.
setDirty
(
false
);
model
.
setDirty
(
false
);
assert
.
ok
(
!
model
.
isDirty
()
);
assert
.
strictEqual
(
model
.
isDirty
(),
false
);
assert
.
equal
(
eventCounter
,
2
);
assert
.
equal
(
eventCounter
,
2
);
model
.
dispose
();
model
.
dispose
();
...
...
src/vs/workbench/test/browser/api/extHostApiCommands.test.ts
浏览文件 @
edd37076
...
@@ -200,7 +200,7 @@ suite('ExtHostLanguageFeatureCommands', function () {
...
@@ -200,7 +200,7 @@ suite('ExtHostLanguageFeatureCommands', function () {
return
commands
.
executeCommand
<
vscode
.
SymbolInformation
[]
>
(
'
vscode.executeWorkspaceSymbolProvider
'
,
'
testing
'
).
then
(
value
=>
{
return
commands
.
executeCommand
<
vscode
.
SymbolInformation
[]
>
(
'
vscode.executeWorkspaceSymbolProvider
'
,
'
testing
'
).
then
(
value
=>
{
for
(
let
info
of
value
)
{
for
(
let
info
of
value
)
{
assert
.
ok
(
info
instanceof
types
.
SymbolInformation
);
assert
.
strictEqual
(
info
instanceof
types
.
SymbolInformation
,
true
);
assert
.
equal
(
info
.
name
,
'
testing
'
);
assert
.
equal
(
info
.
name
,
'
testing
'
);
assert
.
equal
(
info
.
kind
,
types
.
SymbolKind
.
Array
);
assert
.
equal
(
info
.
kind
,
types
.
SymbolKind
.
Array
);
}
}
...
@@ -566,8 +566,8 @@ suite('ExtHostLanguageFeatureCommands', function () {
...
@@ -566,8 +566,8 @@ suite('ExtHostLanguageFeatureCommands', function () {
return
commands
.
executeCommand
<
vscode
.
SymbolInformation
[]
>
(
'
vscode.executeDocumentSymbolProvider
'
,
model
.
uri
).
then
(
values
=>
{
return
commands
.
executeCommand
<
vscode
.
SymbolInformation
[]
>
(
'
vscode.executeDocumentSymbolProvider
'
,
model
.
uri
).
then
(
values
=>
{
assert
.
equal
(
values
.
length
,
2
);
assert
.
equal
(
values
.
length
,
2
);
let
[
first
,
second
]
=
values
;
let
[
first
,
second
]
=
values
;
assert
.
ok
(
first
instanceof
types
.
SymbolInformation
);
assert
.
strictEqual
(
first
instanceof
types
.
SymbolInformation
,
true
);
assert
.
ok
(
second
instanceof
types
.
SymbolInformation
);
assert
.
strictEqual
(
second
instanceof
types
.
SymbolInformation
,
true
);
assert
.
equal
(
first
.
name
,
'
testing2
'
);
assert
.
equal
(
first
.
name
,
'
testing2
'
);
assert
.
equal
(
second
.
name
,
'
testing1
'
);
assert
.
equal
(
second
.
name
,
'
testing1
'
);
});
});
...
@@ -594,9 +594,9 @@ suite('ExtHostLanguageFeatureCommands', function () {
...
@@ -594,9 +594,9 @@ suite('ExtHostLanguageFeatureCommands', function () {
return
commands
.
executeCommand
<
(
vscode
.
SymbolInformation
&
vscode
.
DocumentSymbol
)[]
>
(
'
vscode.executeDocumentSymbolProvider
'
,
model
.
uri
).
then
(
values
=>
{
return
commands
.
executeCommand
<
(
vscode
.
SymbolInformation
&
vscode
.
DocumentSymbol
)[]
>
(
'
vscode.executeDocumentSymbolProvider
'
,
model
.
uri
).
then
(
values
=>
{
assert
.
equal
(
values
.
length
,
2
);
assert
.
equal
(
values
.
length
,
2
);
let
[
first
,
second
]
=
values
;
let
[
first
,
second
]
=
values
;
assert
.
ok
(
first
instanceof
types
.
SymbolInformation
);
assert
.
strictEqual
(
first
instanceof
types
.
SymbolInformation
,
true
);
assert
.
ok
(
!
(
first
instanceof
types
.
DocumentSymbol
)
);
assert
.
strictEqual
(
first
instanceof
types
.
DocumentSymbol
,
false
);
assert
.
ok
(
second
instanceof
types
.
SymbolInformation
);
assert
.
strictEqual
(
second
instanceof
types
.
SymbolInformation
,
true
);
assert
.
equal
(
first
.
name
,
'
DocumentSymbol
'
);
assert
.
equal
(
first
.
name
,
'
DocumentSymbol
'
);
assert
.
equal
(
first
.
children
.
length
,
1
);
assert
.
equal
(
first
.
children
.
length
,
1
);
assert
.
equal
(
second
.
name
,
'
SymbolInformation
'
);
assert
.
equal
(
second
.
name
,
'
SymbolInformation
'
);
...
...
src/vs/workbench/test/browser/parts/editor/editorPane.test.ts
浏览文件 @
edd37076
...
@@ -107,7 +107,7 @@ suite('Workbench EditorPane', () => {
...
@@ -107,7 +107,7 @@ suite('Workbench EditorPane', () => {
assert
(
!
e
.
input
);
assert
(
!
e
.
input
);
await
e
.
setInput
(
input
,
options
,
Object
.
create
(
null
),
CancellationToken
.
None
);
await
e
.
setInput
(
input
,
options
,
Object
.
create
(
null
),
CancellationToken
.
None
);
assert
.
strictEqual
(
input
,
e
.
input
);
assert
.
strictEqual
(
<
any
>
input
,
e
.
input
);
const
group
=
new
TestEditorGroupView
(
1
);
const
group
=
new
TestEditorGroupView
(
1
);
e
.
setVisible
(
true
,
group
);
e
.
setVisible
(
true
,
group
);
assert
(
e
.
isVisible
());
assert
(
e
.
isVisible
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录