Skip to content

Commit 564c2f4

Browse files
committed
Clean test
1 parent cbf450c commit 564c2f4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/form_builder_validators_test.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -591,14 +591,10 @@ void main() {
591591
final validator = FormBuilderValidators.fileExtension(
592592
allowedExtensions: ['txt', 'pdf'],
593593
);
594-
// Create a temporary file
595-
final file = File('test.txt')..createSync();
596594
// Pass
597-
expect(validator(file), isNull);
595+
expect(validator(File('test.txt')), isNull);
598596
// Fail
599597
expect(validator(File('test.doc')), isNotNull);
600-
// Cleanup
601-
file.deleteSync();
602598
}),
603599
);
604600

0 commit comments

Comments
 (0)