adding only tests

This commit is contained in:
Aiday Marlen Kyzy 2024-03-20 18:31:26 +01:00
parent 0b391fa2d1
commit 3d71904882
No known key found for this signature in database
GPG key ID: 24A8B53DBD26FF4E
3 changed files with 3 additions and 13 deletions

View file

@ -215,12 +215,6 @@
"action": {
"indent": "outdent"
}
},
{
"beforeText": "^\\s*(var|const|let)\\s+\\w+\\s*=\\s*\\(.*\\)\\s*=>\\s*$",
"action": {
"indent": "indent"
}
},
}
]
}

View file

@ -548,6 +548,7 @@ suite('`Full` Auto Indent On Type - TypeScript/JavaScript', () => {
test('issue #208215: indent after arrow function', () => {
// https://github.com/microsoft/vscode/issues/208215
// consider the regex: /^\s*(var|const|let)\s+\w+\s*=\s*\(.*\)\s*=>\s*$/
const model = createTextModel("", languageId, {});
disposables.add(model);
@ -568,7 +569,7 @@ suite('`Full` Auto Indent On Type - TypeScript/JavaScript', () => {
test.skip('issue #208215: outdented after semicolon detected after arrow function', () => {
// Notes: we want to outdent after having detected a semi-colon which marks the end of the line, but only when we have detected an arrow function
// We want to have one outdent pattern corresponding to an indent pattern, and not a generic outdent and indent pattern
// We could use one outdent pattern corresponding per indent pattern, and not a generic outdent and indent pattern
const model = createTextModel([
'const add1 = (n) =>',

View file

@ -40,9 +40,4 @@ export const javascriptOnEnterRules = [
beforeText: /^\s+([^{i\s]|i(?!f\b))/,
action: { indentAction: IndentAction.Outdent }
},
{
// TODO: Do not leave this here - place instead in the indent regex pattern if we use this method
beforeText: /^\s*(var|const|let)\s+\w+\s*=\s*\(.*\)\s*=>\s*$/,
action: { indentAction: IndentAction.Indent }
},
];