如何测试DART的runApp()函数

时间:2019-12-03 23:34:32

标签: unit-testing testing flutter dart flutter-test

由于DART的runApp()功能,我无法达到 100%测试的覆盖率。我试图为此功能创建测试,但不能。有没有人为此功能创建过测试?

void main() => runApp(MyApp());

我的覆盖率是96.2%,因为只有一条带有runApp()函数的行没有测试。

我想知道如何为此功能创建单元测试。

enter image description here

项目来源:full_testing_flutter

0 个答案:

没有答案
相关问题