Skip to content

Commit db122d5

Browse files
committed
Update old tests to match changes
1 parent 0a07e65 commit db122d5

File tree

7 files changed

+9
-18
lines changed

7 files changed

+9
-18
lines changed

pkgs/yaml_edit/test/remove_test.dart

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ c: 3
131131
doc.remove([0, 'b']);
132132
expect(doc.toString(), equals('''
133133
- a: 1
134-
135134
c: 3
136135
'''));
137136
});
@@ -184,9 +183,7 @@ b: 2
184183
a: 1
185184
''');
186185
doc.remove(['a']);
187-
expect(doc.toString(), equals('''
188-
{}
189-
'''));
186+
expect(doc.toString(), equals('{}'));
190187
});
191188

192189
test('last element should return flow empty map (2)', () {
@@ -331,9 +328,7 @@ next: value
331328
- 0
332329
''');
333330
doc.remove([0]);
334-
expect(doc.toString(), equals('''
335-
[]
336-
'''));
331+
expect(doc.toString(), equals('[]'));
337332
});
338333

339334
test('last element should return flow empty list (2)', () {

pkgs/yaml_edit/test/testdata/output/issue_55.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ environment:
1212
sdk: ^3.0.0
1313
dependencies:
1414
dev_dependencies:
15-
{}
15+
{}

pkgs/yaml_edit/test/testdata/output/remove_block_list.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
- foo: true
3434
- {}
3535
- nested:
36-
{}
36+
{}

pkgs/yaml_edit/test/testdata/output/remove_nested_key.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ B:
99
---
1010
A: true
1111
B:
12-
{}
12+
{}

pkgs/yaml_edit/test/testdata/output/remove_nested_key_with_null.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ B:
44
---
55
A: true
66
B:
7-
{}
7+
{}

pkgs/yaml_edit/test/testdata/output/remove_nested_key_with_trailing_comma.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ B:
44
---
55
A: true
66
B:
7-
{}
7+
{}

pkgs/yaml_edit/test/windows_test.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ c: 3\r
161161
- 0\r
162162
''');
163163
doc.remove([0]);
164-
expect(doc.toString(), equals('''
165-
[]\r
166-
'''));
164+
expect(doc.toString(), equals('[]'));
167165
expectYamlBuilderValue(doc, []);
168166
});
169167

@@ -204,9 +202,7 @@ c: 3\r
204202
a: 1\r
205203
''');
206204
doc.remove(['a']);
207-
expect(doc.toString(), equals('''
208-
{}\r
209-
'''));
205+
expect(doc.toString(), equals('{}'));
210206
expectYamlBuilderValue(doc, {});
211207
});
212208

0 commit comments

Comments
 (0)