test_util 0.1.0 copy "test_util: ^0.1.0" to clipboard
test_util: ^0.1.0 copied to clipboard

Helpers and utilities for testing.

Various helpers and utilities for testing.

Usage #

import 'package:test/test.dart';
import 'package:test_util/test_util.dart';

void main() {
  test('A dart program succeeds', () async {
    await dartPubGet();
    final result = await dartRun(
      ['hello.dart', 'Alexey'],
      workingDirectory: 'example',
    );

    expect(result.stdout, 'Hello, Alexey!\n');
  });

  test('A dart program fails', () async {
    await dartPubGet();
    final result = await dartRun(
      ['fail.dart'],
      expectedExitCode: 123,
      workingDirectory: 'example',
    );

    expect(result.stderr, 'My error.\n');
  });
}
1
likes
150
pub points
0%
popularity

Publisher

verified publisherainkin.com

Helpers and utilities for testing.

Repository (GitHub)
View/report issues

Topics

#testing #cli

Documentation

API reference

License

MIT-0 (license)

Dependencies

test

More

Packages that depend on test_util