Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,27 @@ volumes:
await requestDocumentFormattingAndCompare(testConnection, uri, 2, expected2Space);
});

it('Should NOT break YAML anchors', async () => {
// See https://github.com/microsoft/vscode-containers/issues/537
// The anchor must stay inline with its key and not be pushed onto a new line
const testObject = `version: "3.5"

x-anchor: &anchor
FOO: bar

services:
example:
<<: *anchor
image: alpine
`;

const uri = testConnection.sendTextAsYamlDocument(testObject);

const expected2Space = testObject; // Output will be unchanged, anchors must not be broken

await requestDocumentFormattingAndCompare(testConnection, uri, 2, expected2Space);
});
Comment thread
bwateratmsft marked this conversation as resolved.

it('Should NOT wrap long string lines', async () => {
const testObject = `version: '123'
services:
Expand Down
Loading