file_testing 2.1.0

file_testing #

Testing utilities intended to work with package:file

Features #

This package provides a series of matchers to be used in tests that work with file system types.

Usage #

import 'package:file/file.dart';
import 'package:file_testing/file_testing.dart';
import 'package:test/test.dart';

test('some test', () {
  MemoryFileSystem fs;

  setUp(() {
    fs = new MemoryFileSystem();

  expectFileSystemException(ErrorCodes.ENOENT, () {'').resolveSymbolicLinksSync();
  expect(fs.file('/path/to/file'), isFile);
  expect(fs.file('/path/to/directory'), isDirectory);
  expect(fs.file('/foo'), exists);

2.1.0 #

  • Changed dependency on package:test to package:test_api
  • Bumped Dart SDK constraint to match package:test_api's requirements
  • Updated style to match latest lint rules from Flutter repo.

2.0.3 #

  • Relaxed constraints on package:test

2.0.2 #

  • Bumped dependency on package:test to version 1.0

2.0.1 #

  • Bumped Dart SDK constraint to allow for Dart 2 stable

2.0.0 #

  • Removed record_replay_matchers.dart from API

1.0.0 #

  • Moved package:file/testing.dart library into a dedicated package so that libraries don't need to take on a transitive dependency on package:test in order to use package:file.

Use this package as a library

1. Depend on it

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

  file_testing: ^2.1.0

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:file_testing/file_testing.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health suggestions

Fix lib/src/testing/core_matchers.dart. (-0.50 points)

Analysis of lib/src/testing/core_matchers.dart reported 1 hint:

line 7 col 1: 'package:test_api/test_api.dart' is deprecated and shouldn't be used. package:test_api is not intended for general use. Please use package:test..

Maintenance issues and suggestions

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field was unreachable.

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 file_testing.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
meta ^1.1.2 1.1.8
test_api ^0.2.2 0.2.14
Transitive dependencies
async 2.4.0
boolean_selector 2.0.0
charcode 1.1.3
collection 1.14.12
matcher 0.12.6
path 1.6.4
source_span 1.6.0
stack_trace 1.9.3
stream_channel 2.0.0
string_scanner 1.0.5
term_glyph 1.1.0