diff --git a/src/vs/base/test/common/jsonEdit.test.ts b/src/vs/base/test/common/jsonEdit.test.ts index 2b8ea381df2ade339f06df93025749fc99590226..ef9966424488bfce5d2c3766956356631ef36385 100644 --- a/src/vs/base/test/common/jsonEdit.test.ts +++ b/src/vs/base/test/common/jsonEdit.test.ts @@ -150,10 +150,16 @@ suite('JSON - edits', () => { assertEdit(content, edits, '[\n 1,\n 2\n]'); }); - test('remove last item in the array if ends with comman', () => { + test('remove last item in the array if ends with comma', () => { let content = '[\n 1,\n "foo",\n "bar",\n]'; let edits = setProperty(content, [2], void 0, formatterOptions); assertEdit(content, edits, '[\n 1,\n "foo"\n]'); }); + test('remove last item in the array if there is a comment in the beginning', () => { + let content = '// This is a comment\n[\n 1,\n "foo",\n "bar"\n]'; + let edits = setProperty(content, [2], void 0, formatterOptions); + assertEdit(content, edits, '// This is a comment\n[\n 1,\n "foo"\n]'); + }); + }); \ No newline at end of file