mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Adding plnning test for rest paramters
This commit is contained in:
parent
e8f00e763a
commit
af05b65331
|
@ -62,4 +62,13 @@ suite('typescript function call snippets', () => {
|
|||
).value,
|
||||
'foo(${1:a}, ${2:b}, ${3:c})$0');
|
||||
});
|
||||
|
||||
test('Should create empty placeholder at rest parameter', async () => {
|
||||
assert.strictEqual(
|
||||
snippetForFunctionCall(
|
||||
{ label: 'foo' },
|
||||
[{ "text": "function", "kind": "keyword" }, { "text": " ", "kind": "space" }, { "text": "foo", "kind": "functionName" }, { "text": "(", "kind": "punctuation" }, { "text": "a", "kind": "parameterName" }, { "text": ":", "kind": "punctuation" }, { "text": " ", "kind": "space" }, { "text": "string", "kind": "keyword" }, { "text": ",", "kind": "punctuation" }, { "text": " ", "kind": "space" }, { "text": "...", "kind": "punctuation" }, { "text": "rest", "kind": "parameterName" }, { "text": ":", "kind": "punctuation" }, { "text": " ", "kind": "space" }, { "text": "any", "kind": "keyword" }, { "text": "[", "kind": "punctuation" }, { "text": "]", "kind": "punctuation" }, { "text": ")", "kind": "punctuation" }, { "text": ":", "kind": "punctuation" }, { "text": " ", "kind": "space" }, { "text": "void", "kind": "keyword" }]
|
||||
).value,
|
||||
'foo(${1:a}$2)$0');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue