Merge pull request #208234 from microsoft/aiday/indentationWithinCommentsTest

Test for incorrect indentation within comment
This commit is contained in:
Aiday Marlen Kyzy 2024-03-21 09:53:46 +01:00 committed by GitHub
commit 8fe4497ec3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -710,6 +710,31 @@ suite('`Full` Auto Indent On Type - TypeScript/JavaScript', () => {
});
});
test.skip('issue #208232: incorrect indentation inside of comments', () => {
// https://github.com/microsoft/vscode/issues/208232
const model = createTextModel([
'/**',
'indentation done for {',
'*/'
].join('\n'), languageId, {});
disposables.add(model);
withTestCodeEditor(model, { autoIndent: "full" }, (editor, viewModel, instantiationService) => {
registerLanguage(instantiationService, languageId, Language.TypeScript, disposables);
editor.setSelection(new Selection(2, 23, 2, 23));
viewModel.type("\n", 'keyboard');
assert.strictEqual(model.getValue(), [
'/**',
'indentation done for {',
'',
'*/'
].join('\n'));
});
});
// Add tests for:
// https://github.com/microsoft/vscode/issues/88638
// https://github.com/microsoft/vscode/issues/63388