提交 919254bc 编写于 作者: S Sandeep Somavarapu

#18095 Json edit

- Test to remove last item in the array if there is a comment in the beginning
上级 9bb8aad5
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册