From c016c2ed95fcf8619348b41498d5bb3cdeb01283 Mon Sep 17 00:00:00 2001 From: Ankit Mahato Date: Thu, 20 Jul 2023 05:17:34 +0530 Subject: [PATCH] Update CONTRIBUTING.md Add single file testing --- CONTRIBUTING.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 32c82a67..fff66253 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -151,6 +151,20 @@ To view the coverage report in the browser for further analysis, execute: open coverage/html/index.html ``` +#### Testing a single file + +To run tests specified in a single file, execute the following command: + +``` +flutter test --enable-experiment=records .dart +``` + +Example: + +``` +flutter test --enable-experiment=records test/widgets/codegen_previewer_test.dart +``` + ### How to add a new package to pubspec.yaml? Instead of copy pasting from pub.dev, it is recommended that you use `flutter pub add package_name` to add a new package to `pubspec.yaml`. You can read more [here](https://docs.flutter.dev/packages-and-plugins/using-packages#adding-a-package-dependency-to-an-app-using-flutter-pub-add).