Skip to content

Commit

Permalink
fix: migrated breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
Equartey committed Feb 27, 2024
1 parent 2458a8c commit c7a298b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
16 changes: 8 additions & 8 deletions actions/test/node/interop_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void main() {

test('exec', () async {
await check(childProcess.exec('echo', ['Hello'])).completes(
it()
(it) => it
..has((res) => res.exitCode, 'exitCode').equals(0)
..has((res) => res.stdout, 'stdout').equals('Hello\n'),
);
Expand All @@ -56,17 +56,17 @@ void main() {
unawaited(
check(proc.stdout!.stream).withQueue.inOrder([
// ignore: unawaited_futures
it()..emits(it()..deepEquals(utf8.encode('Hello\n'))),
(it) => it..emits((it) => it..deepEquals(utf8.encode('Hello\n'))),
// ignore: unawaited_futures
it()..isDone(),
(it) => it..isDone(),
]),
);
unawaited(
check(proc.stderr!.stream).withQueue.isDone(),
);
unawaited(
check((proc.onClose, proc.onExit).wait).completes(
it()..has((res) => res.$2.toDartInt, 'exitCode').equals(0),
(it) => it..has((res) => res.$2.toDartInt, 'exitCode').equals(0),
),
);
await check(proc.onSpawn).completes();
Expand All @@ -82,21 +82,21 @@ void main() {
);
unawaited(
check(proc.stdout!.stream).withQueue.inOrder([
it()
(it) => it
// ignore: unawaited_futures
..emits(
it()..deepEquals(utf8.encode('Hello\n')),
(it) => it..deepEquals(utf8.encode('Hello\n')),
),
// ignore: unawaited_futures
it()..isDone(),
(it) => it..isDone(),
]),
);
unawaited(
check(proc.stderr!.stream).withQueue.isDone(),
);
unawaited(
check((proc.onClose, proc.onExit).wait).completes(
it()..has((res) => res.$2.toDartInt, 'exitCode').equals(0),
(it) => it..has((res) => res.$2.toDartInt, 'exitCode').equals(0),
),
);
await check(proc.onSpawn).completes();
Expand Down
18 changes: 9 additions & 9 deletions actions/test/node/process_manager_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void main() {
group('run', () {
test('echo', () async {
await check(processManager.run(['echo', 'Hello'])).completes(
it()
(it) => it
..has((res) => res.exitCode, 'exitCode').equals(0)
..has((res) => res.stdout, 'stdout').equals('Hello\n'),
);
Expand All @@ -38,7 +38,7 @@ void main() {
test('pipe', () async {
final echo = childProcess.spawn('echo', ['Hello']);
await check(processManager.run(['tee'], pipe: echo)).completes(
it()
(it) => it
..has((res) => res.exitCode, 'exitCode').equals(0)
..has((res) => res.stdout, 'stdout').equals('Hello\n'),
);
Expand All @@ -58,16 +58,16 @@ void main() {
if (mode != ProcessStartMode.inheritStdio &&
mode != ProcessStartMode.detached)
// ignore: unawaited_futures
it()..emits(it()..deepEquals(expectedOutput)),
(it) => it..emits((it) => it..deepEquals(expectedOutput)),
// ignore: unawaited_futures
it()..isDone(),
(it) => it..isDone(),
]),
);
unawaited(
check(proc.stderr).withQueue.isDone(),
);
check(proc.pid).isGreaterThan(0);
await check(proc.exitCode).completes(it()..equals(0));
await check(proc.exitCode).completes((it) => it..equals(0));
});
}

Expand All @@ -76,15 +76,15 @@ void main() {
final proc = await processManager.start(['tee'], pipe: echo);
unawaited(
check(proc.stdout).withQueue.inOrder([
it()
(it) => it
// ignore: unawaited_futures
..emits(it()..deepEquals(utf8.encode('Hello\n'))),
..emits((it) => it..deepEquals(utf8.encode('Hello\n'))),
// ignore: unawaited_futures
it()..isDone(),
(it) => it..isDone(),
]),
);
unawaited(check(proc.stderr).withQueue.isDone());
await check(proc.exitCode).completes(it()..equals(0));
await check(proc.exitCode).completes((it) => it..equals(0));
});
});
});
Expand Down
6 changes: 3 additions & 3 deletions packages/aft/test/config/config_loader_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ aft:
'workingDirectory',
).equals(workingDirectory)
..has((config) => config.dependencies.toMap(), 'dependencies').which(
it()
(it) => it
..containsKey('json_serializable')
..not(it()..containsKey('built_value')),
..not((it) => it..containsKey('built_value')),
)
..has((config) => config.scripts.toMap(), 'scripts').which(
it()
(it) => it
..containsKey('license')
..containsKey('format'),
);
Expand Down

0 comments on commit c7a298b

Please sign in to comment.