Skip to main content

Scaffolding Home Tests ๐Ÿงช๐Ÿก

The scaffolding_home_test is the simplest scaffolding brick designed to unit test the home view brick. It takes the same parameters as the previous scaffolding_home brick.

So to add test to many features from the previous example we would first add the brick

# ๐Ÿ  add the scaffolding_home_test brick
mason add scaffolding_home_test

and then running with the same parameters as scaffolding_home_test

mason make scaffolding_home_test --package static_scaffolding_sample \
--features feature1,feature2

Which will overwrite the test that only coverage one feature with output similar to below.

You have the following features: [feature1, feature2]
conflict .../static_scaffolding_sample/test/scaffold_app_test.dart
Overwrite scaffold_app_test.dart? (Yyna) Y
โœ“ Made brick scaffolding_home_test (2.5s)
โœ“ Generated 1 file:
.../static_scaffolding_sample/test/scaffold_app_test.dart (new)

Now we have all the fundamentals ๐Ÿ”ฅ , next we learn how we can edit the scaffolding templates if we want to customise.