Skip to content

Commit be09355

Browse files
committed
Update convert_utils_test.dart
1 parent 58cfcff commit be09355

File tree

1 file changed

+0
-102
lines changed

1 file changed

+0
-102
lines changed

test/utils/convert_utils_test.dart

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -274,106 +274,4 @@ Easily manipulate and play around with request inputs like headers, query parame
274274
[kvRow1, kvRow3]);
275275
});
276276
});
277-
278-
group("Testing audioPosition function", () {
279-
test('Testing using dur1', () {
280-
Duration dur1 = const Duration(minutes: 1, seconds: 3);
281-
String dur1Expected = "1:03";
282-
expect(audioPosition(dur1), dur1Expected);
283-
});
284-
285-
test('Testing using dur2', () {
286-
Duration dur2 = const Duration(minutes: 0, seconds: 20);
287-
String dur2Expected = "0:20";
288-
expect(audioPosition(dur2), dur2Expected);
289-
});
290-
291-
test('Testing using dur3', () {
292-
Duration dur3 = const Duration(hours: 3);
293-
String dur3Expected = "180:00";
294-
expect(audioPosition(dur3), dur3Expected);
295-
});
296-
297-
test('Testing using dur4', () {
298-
Duration dur4 = const Duration(seconds: 1, milliseconds: 200);
299-
String dur4Expected = "0:01";
300-
expect(audioPosition(dur4), dur4Expected);
301-
});
302-
303-
test('Testing using dur5', () {
304-
Duration? dur4;
305-
String dur4Expected = "";
306-
expect(audioPosition(dur4), dur4Expected);
307-
});
308-
});
309-
310-
group('Testing RemoveJsonComments', () {
311-
test('Removes single-line comments', () {
312-
String input = '''
313-
{
314-
// This is a single-line comment
315-
"key": "value"
316-
}
317-
''';
318-
319-
String expected = '''{
320-
"key": "value"
321-
}''';
322-
expect(removeJsonComments(input), expected);
323-
});
324-
325-
test('Removes multi-line comments', () {
326-
String input = '''
327-
{
328-
/*
329-
This is a multi-line comment
330-
*/
331-
"key": "value"
332-
}
333-
''';
334-
335-
String expected = '''{
336-
"key": "value"
337-
}''';
338-
expect(removeJsonComments(input), expected);
339-
});
340-
341-
test('Handles valid JSON without comments', () {
342-
String input = '{"key":"value"}';
343-
String expected = '''{
344-
"key": "value"
345-
}''';
346-
expect(removeJsonComments(input), expected);
347-
});
348-
349-
test('Returns original string if invalid JSON', () {
350-
String input = '{key: value}';
351-
String expected = '{key: value}';
352-
expect(removeJsonComments(input), expected);
353-
});
354-
355-
test('Removes trailing commas', () {
356-
String input = '''
357-
{
358-
"key1": "value1",
359-
"key2": "value2", // trailing comma
360-
}
361-
''';
362-
363-
String expected = '''{
364-
"key1": "value1",
365-
"key2": "value2"
366-
}''';
367-
expect(removeJsonComments(input), expected);
368-
});
369-
370-
test('Test blank json', () {
371-
String input = '''
372-
{}
373-
''';
374-
375-
String expected = '{}';
376-
expect(removeJsonComments(input), expected);
377-
});
378-
});
379277
}

0 commit comments

Comments
 (0)