如何忽略“dart-lang/coverage”中的一行

Fra*_*cca 5 code-coverage dart test-coverage flutter codecov

用例

codecov认为super需要测试,

在此输入图像描述

不确定是否为此关键字编写测试

  • 将是有意义的
  • 如何编写这样的测试

在我的疑虑消除之前,我想将该线路排除在覆盖范围之外

问题

我如何忽略其中的一行dart-lang/coverage

lsa*_*don 11

我看到这个。不完美,但解决方案

// coverage:ignore-line to ignore one line.
// coverage:ignore-start and // coverage:ignore-end to ignore range of lines inclusive.
// coverage:ignore-file to ignore the whole file.
Run Code Online (Sandbox Code Playgroud)