mockito 5.0.4
mockito: ^5.0.4 copied to clipboard

A mock framework inspired by Mockito.

325
likes
90 / 130
pub points
98 %
popularity

We analyzed this package on Apr 12, 2021, and awarded it 90 pub points (of a possible 130):

Follow Dart file conventions
10 / 20

0/10 points: Provide a valid pubspec.yaml

The package description is too short.

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

5/5 points: Provide a valid README.md

5/5 points: Provide a valid CHANGELOG.md

Provide documentation
20 / 20

10/10 points: Package has an example

  • Found example at: example/example.dart

10/10 points: 20% or more of the public API has dartdoc comments

  • 31 out of 54 API elements (57.4 %) have documentation comments.
Support multiple platforms
20 / 20

20/20 points: Supports 2 of 2 possible platforms (native, js)

Pass static analysis
20 / 30

20/30 points: code has no errors, warnings, lints, or formatting issues

INFO: 'nonSubtypableClasses' is deprecated and shouldn't be used. Use isNonSubtypableClass instead.

lib/src/builder.dart:379:24

    ╷
379 │       if (typeProvider.nonSubtypableClasses.contains(elementToMock)) {
    │                        ^^^^^^^^^^^^^^^^^^^^
    ╵

To reproduce make sure you are using pedantic and run dartanalyzer lib/src/builder.dart

INFO: 'CastError' is deprecated and shouldn't be used. Use TypeError instead.

lib/src/mock.dart:834:10

    ╷
834 │     } on CastError catch (e) {
    │          ^^^^^^^^^
    ╵

To reproduce make sure you are using pedantic and run dartanalyzer lib/src/mock.dart

Support up-to-date dependencies
20 / 20

10/10 points: All of the package dependencies are supported in the latest version

PackageConstraintCompatibleLatest
analyzer^1.0.01.4.01.4.0
build>=1.3.0 <3.0.02.0.02.0.0
code_builder^3.7.03.7.03.7.0
collection^1.15.01.15.01.15.0
dart_style>=1.3.6 <3.0.02.0.02.0.0
matcher^0.12.100.12.100.12.10
meta^1.3.01.3.01.3.0
path^1.8.01.8.01.8.0
source_gen>=0.9.6 <2.0.01.0.01.0.0
test_api>=0.2.1 <0.4.00.3.00.3.0
Transitive dependencies
PackageConstraintCompatibleLatest
_fe_analyzer_shared-20.0.020.0.0
args-2.0.02.0.0
async-2.5.02.5.0
boolean_selector-2.1.02.1.0
built_collection-5.0.05.0.0
built_value-8.0.48.0.4
charcode-1.2.01.2.0
cli_util-0.3.00.3.0
convert-3.0.03.0.0
crypto-3.0.13.0.1
file-6.1.06.1.0
fixnum-1.0.01.0.0
glob-2.0.12.0.1
logging-1.0.11.0.1
pub_semver-2.0.02.0.0
source_span-1.8.11.8.1
stack_trace-1.10.01.10.0
stream_channel-2.1.02.1.0
string_scanner-1.1.01.1.0
term_glyph-1.2.01.2.0
typed_data-1.3.01.3.0
watcher-1.0.01.0.0
yaml-3.1.03.1.0

To reproduce run pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides.

10/10 points: Package supports latest stable Dart and Flutter SDKs

Support sound null safety
0 / 20

0/20 points: Null safety support has one or more issues.

Package is not null safe

Because:

  • mockito that depends on:
  • code_builder that doesn't opt in to null safety
For more information

Try running pub outdated --mode=null-safety. Be sure to read the migration guide.

Analysed with Pana 0.15.4, Dart 2.12.2.