google / google/webcrypto.dart

Apply coverage ignore comments as applicable

Open
#263 3 comments 0 reactions 0 assignees View on GitHub
cleanup
Dominant language
Dart
Stars
116
Forks
110
Avg merge
6d 8h
Merged PRs (30d)
9

Description

From: https://pub.dev/packages/coverage

> **Ignore lines from coverage**
> * `// 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.

We should apply this to bit of the code that we don't want coverage for.
I'm sure we have a few places that we don't care to test.

**Example**, maybe it's overkill to test `requireSubtleCrypto` logic, we could just make that private method, and use these coverage-ignore comments to avoid counting it in coverage.
https://github.com/google/webcrypto.dart/blob/7a673ab4bdf2c4638e819aa75608e019a3488fb7/lib/src/crypto_subtle.dart#L81-L102

This is really just nice to have and generally users shouldn't hit this. And we don't really want to make testing setups where we can reproduce the behavior. So any testing we do is kind of artificial anyways.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.