test_api 0.2.7

test_api #

This is a a minimal package for writing tests. At this time this package is not intended to be publicly used as the API will take time to stabilize.

0.2.7 #

  • Prepare for upcoming Stream<List<int>> changes in the Dart SDK.
  • Mark package:test_api as deprecated to prevent accidental use.

0.2.6 #

  • Don't swallow exceptions from callbacks in expectAsync*.
  • Internal cleanup - fix lints.
  • Fixed a race condition that caused tests to occasionally fail during tearDownAll with the message (tearDownAll) - did not complete [E].

0.2.5 #

  • Expose the Metadata, PlatformSelector, Runtime, and SuitePlatform classes publicly through a new backend.dart import.

0.2.4 #

  • Allow stream_channel version 2.0.0.

0.2.3 #

  • Update to matcher version 0.12.5.

0.2.2 #

  • Require Dart SDK >=2.1.0.

0.2.1 #

  • Add remote_listener.dart and suite_channel_manager.dart.

0.2.0 #

  • Remove "runner" extensions.

0.1.1 #

  • Update stack_trace_formatter to fold test_api frames by default.

0.1.0 #

  • Initial release of test_api. Provides the basic API for writing tests and touch points for implementing a custom test runner.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  test_api: ^0.2.7

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:test_api/test_api.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
96
Health:
Code health derived from static analysis. [more]
91
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
89
Learn more about scoring.

We analyzed this package on Sep 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:test_api/test_api.dart.

Health suggestions

Fix lib/src/frontend/throws_matchers.dart. (-5.36 points)

Analysis of lib/src/frontend/throws_matchers.dart reported 11 hints, including:

line 10 col 37: 'Throws' is deprecated and shouldn't be used.

line 14 col 5: 'Throws' is deprecated and shouldn't be used.

line 18 col 5: 'Throws' is deprecated and shouldn't be used.

line 21 col 33: 'Throws' is deprecated and shouldn't be used.

line 24 col 39: 'Throws' is deprecated and shouldn't be used.

Fix lib/src/frontend/expect.dart. (-2.48 points)

Analysis of lib/src/frontend/expect.dart reported 5 hints:

line 58 col 47: 'ErrorFormatter' is deprecated and shouldn't be used.

line 79 col 49: 'ErrorFormatter' is deprecated and shouldn't be used.

line 84 col 12: 'formatFailure' is deprecated and shouldn't be used.

line 122 col 12: 'formatFailure' is deprecated and shouldn't be used.

line 127 col 14: 'formatFailure' is deprecated and shouldn't be used.

Fix lib/src/frontend/async_matcher.dart. (-0.50 points)

Analysis of lib/src/frontend/async_matcher.dart reported 1 hint:

line 42 col 16: 'formatFailure' is deprecated and shouldn't be used.

Fix lib/src/frontend/spawn_hybrid.dart. (-0.50 points)

Analysis of lib/src/frontend/spawn_hybrid.dart reported 1 hint:

line 12 col 1: 'package:test_api/test_api.dart' is deprecated and shouldn't be used.

Fix lib/src/frontend/throws_matcher.dart. (-0.50 points)

Analysis of lib/src/frontend/throws_matcher.dart reported 1 hint:

line 38 col 29: 'Throws' is deprecated and shouldn't be used.

Maintenance suggestions

The package description is too short. (-20 points)

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.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and test_api.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
async ^2.0.0 2.3.0
boolean_selector ^1.0.0 1.0.5
collection ^1.8.0 1.14.12
matcher >=0.12.5 <0.12.6 0.12.5
meta ^1.1.5 1.1.7
path ^1.2.0 1.6.4
pedantic ^1.0.0 1.8.0+1
source_span ^1.4.0 1.5.5
stack_trace ^1.9.0 1.9.3
stream_channel >=1.7.0 <3.0.0 2.0.0
string_scanner ^1.0.0 1.0.5
term_glyph ^1.0.0 1.1.0
Transitive dependencies
charcode 1.1.2
Dev dependencies
fake_async ^1.0.0
test any
test_core any
test_descriptor ^1.0.0
test_process ^1.0.0