file_testing 2.0.1 copy "file_testing: ^2.0.1" to clipboard
file_testing: ^2.0.1 copied to clipboard

unlistedoutdated

Testing utilities for package:file

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();
    fs.file('/foo').createSync();
  });

  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);
});
4
likes
0
points
4.18M
downloads

Publisher

verified publishertools.dart.dev

Weekly Downloads

Testing utilities for package:file

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

meta, test

More

Packages that depend on file_testing