/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import 'mocha'; import * as assert from 'assert'; import { Selection } from 'vscode'; import { withRandomFileEditor, closeAllEditors } from './testUtils'; import { toggleComment as toggleCommentImpl } from '../toggleComment'; function toggleComment(): Thenable { const result = toggleCommentImpl(); assert.ok(result); return result!; } suite('Tests for Toggle Comment action from Emmet (HTML)', () => { teardown(closeAllEditors); const contents = `
`; test('toggle comment with multiple cursors, but no selection (HTML)', () => { const expectedContents = `
`; return withRandomFileEditor(contents, 'html', (editor, doc) => { editor.selections = [ new Selection(3, 17, 3, 17), // cursor inside the inner span element new Selection(4, 5, 4, 5), // cursor inside opening tag new Selection(5, 35, 5, 35), // cursor inside closing tag new Selection(7, 3, 7, 3), // cursor inside open tag of