Viewing version 3.0.2. Open the latest package page.
file_testing
3.0.2Testing utilities for package:file.
Readme
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_apiback topackage:test.
2.1.0
- Changed dependency on
package:testtopackage: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:testto version 1.0
2.0.1
- Bumped Dart SDK constraint to allow for Dart 2 stable
2.0.0
- Removed
record_replay_matchers.dartfrom API
1.0.0
- Moved
package:file/testing.dartlibrary into a dedicated package so that libraries don't need to take on a transitive dependency onpackage:testin order to usepackage: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
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 1.0.0 | On demand | Download | 0e35e439…244c20 |
| 2.0.0 | On demand | Download | e9b558d5…f908ff |
| 2.0.1 | On demand | Download | a81c8d0b…c4f8a3 |
| 2.0.2 | On demand | Download | d9ec08e2…59fff2 |
| 2.0.3 | On demand | Download | 6826356d…3fc957 |
| 2.1.0 | On demand | Download | d479aadd…41c9f9 |
| 3.0.0 | On demand | Download | 0aaadb40…840fb5 |
| 3.0.1 | On demand | Download | e9f6dc67…964666 |
| 3.0.2 | Cached · Upstream SHA-256 matched | Download | eb0c85fd…0d554d |
| 3.1.0 | On demand | Download | e2f5285a…46c7b4 |
Dependencies
test "^1.23.1"