Viewing version 3.0.2. Open the latest package page.

file_testing

3.0.2

Testing utilities for package:file.

Download archive

Readme

pub package package publisher

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/memory.dart';
import 'package:file_testing/file_testing.dart';
import 'package:test/test.dart';

void main() {
  MemoryFileSystem fs;

  setUp(() {
    fs = MemoryFileSystem();
    fs.file('/foo').createSync();
  });

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

3.0.2

  • Require Dart 3.1.

3.0.1

  • Update the pubspec repository field to reflect the new package repository.
  • Require Dart 3.0.

3.0.0

  • Migrate to null safety.

2.2.0

  • Change dependency on package:test_api back to package:test.

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.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'file_testing:3.0.2'
pubspec.yaml
name: file_testing
version: 3.0.2
description: Testing utilities for package:file.
repository: https://github.com/dart-lang/tools/tree/main/pkgs/file_testing

environment:
  sdk: ^3.1.0

dependencies:
  test: ^1.23.1

dev_dependencies: 
  lints: ^5.0.0

Version history

VersionPublishedArchiveSHA-256
1.0.0On demandDownload0e35e439…244c20
2.0.0On demandDownloade9b558d5…f908ff
2.0.1On demandDownloada81c8d0b…c4f8a3
2.0.2On demandDownloadd9ec08e2…59fff2
2.0.3On demandDownload6826356d…3fc957
2.1.0On demandDownloadd479aadd…41c9f9
3.0.0On demandDownload0aaadb40…840fb5
3.0.1On demandDownloade9f6dc67…964666
3.0.2Cached · Upstream SHA-256 matchedDownloadeb0c85fd…0d554d
3.1.0On demandDownloade2f5285a…46c7b4

Dependencies

test "^1.23.1"