Skip to content

Commit 05bf466

Browse files
authored
chore(bump): checks package (#5305)
* chore(bump): checks package
1 parent 320ee5b commit 05bf466

File tree

5 files changed

+42
-44
lines changed

5 files changed

+42
-44
lines changed

actions/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dev_dependencies:
2323
amplify_lints: ^3.0.0
2424
build_runner: ^2.4.9
2525
build_test: ^2.2.0
26-
checks: ^0.2.2
26+
checks: ^0.3.0
2727
json_serializable: 6.8.0
2828
test: ^1.22.1
2929

actions/test/node/interop_test.dart

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void main() {
4545

4646
test('exec', () async {
4747
await check(childProcess.exec('echo', ['Hello'])).completes(
48-
it()
48+
(it) => it
4949
..has((res) => res.exitCode, 'exitCode').equals(0)
5050
..has((res) => res.stdout, 'stdout').equals('Hello\n'),
5151
);
@@ -54,19 +54,20 @@ void main() {
5454
test('spawn', () async {
5555
final proc = childProcess.spawn('echo', ['Hello']);
5656
unawaited(
57-
check(proc.stdout!.stream).withQueue.inOrder([
58-
// ignore: unawaited_futures
59-
it()..emits(it()..deepEquals(utf8.encode('Hello\n'))),
60-
// ignore: unawaited_futures
61-
it()..isDone(),
62-
]),
57+
expectLater(
58+
proc.stdout!.stream.map(String.fromCharCodes),
59+
emitsInOrder([
60+
'Hello\n',
61+
emitsDone,
62+
]),
63+
),
6364
);
6465
unawaited(
6566
check(proc.stderr!.stream).withQueue.isDone(),
6667
);
6768
unawaited(
6869
check((proc.onClose, proc.onExit).wait).completes(
69-
it()..has((res) => res.$2.toDartInt, 'exitCode').equals(0),
70+
(it) => it..has((res) => res.$2.toDartInt, 'exitCode').equals(0),
7071
),
7172
);
7273
await check(proc.onSpawn).completes();
@@ -81,22 +82,20 @@ void main() {
8182
stdin: echo.stdout,
8283
);
8384
unawaited(
84-
check(proc.stdout!.stream).withQueue.inOrder([
85-
it()
86-
// ignore: unawaited_futures
87-
..emits(
88-
it()..deepEquals(utf8.encode('Hello\n')),
89-
),
90-
// ignore: unawaited_futures
91-
it()..isDone(),
92-
]),
85+
expectLater(
86+
proc.stdout!.stream.map(String.fromCharCodes),
87+
emitsInOrder([
88+
'Hello\n',
89+
emitsDone,
90+
]),
91+
),
9392
);
9493
unawaited(
9594
check(proc.stderr!.stream).withQueue.isDone(),
9695
);
9796
unawaited(
9897
check((proc.onClose, proc.onExit).wait).completes(
99-
it()..has((res) => res.$2.toDartInt, 'exitCode').equals(0),
98+
(it) => it..has((res) => res.$2.toDartInt, 'exitCode').equals(0),
10099
),
101100
);
102101
await check(proc.onSpawn).completes();

actions/test/node/process_manager_test.dart

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
library;
66

77
import 'dart:async';
8-
import 'dart:convert';
98

109
import 'package:actions/actions.dart';
1110
import 'package:actions/src/node/process_manager.dart';
@@ -29,7 +28,7 @@ void main() {
2928
group('run', () {
3029
test('echo', () async {
3130
await check(processManager.run(['echo', 'Hello'])).completes(
32-
it()
31+
(it) => it
3332
..has((res) => res.exitCode, 'exitCode').equals(0)
3433
..has((res) => res.stdout, 'stdout').equals('Hello\n'),
3534
);
@@ -38,7 +37,7 @@ void main() {
3837
test('pipe', () async {
3938
final echo = childProcess.spawn('echo', ['Hello']);
4039
await check(processManager.run(['tee'], pipe: echo)).completes(
41-
it()
40+
(it) => it
4241
..has((res) => res.exitCode, 'exitCode').equals(0)
4342
..has((res) => res.stdout, 'stdout').equals('Hello\n'),
4443
);
@@ -52,39 +51,39 @@ void main() {
5251
['echo', 'Hello'],
5352
mode: mode,
5453
);
55-
final expectedOutput = utf8.encode('Hello\n');
5654
unawaited(
57-
check(proc.stdout).withQueue.inOrder([
58-
if (mode != ProcessStartMode.inheritStdio &&
59-
mode != ProcessStartMode.detached)
60-
// ignore: unawaited_futures
61-
it()..emits(it()..deepEquals(expectedOutput)),
62-
// ignore: unawaited_futures
63-
it()..isDone(),
64-
]),
55+
expectLater(
56+
proc.stdout.map(String.fromCharCodes),
57+
emitsInOrder([
58+
if (mode != ProcessStartMode.inheritStdio &&
59+
mode != ProcessStartMode.detached)
60+
'Hello\n',
61+
emitsDone,
62+
]),
63+
),
6564
);
6665
unawaited(
6766
check(proc.stderr).withQueue.isDone(),
6867
);
6968
check(proc.pid).isGreaterThan(0);
70-
await check(proc.exitCode).completes(it()..equals(0));
69+
await check(proc.exitCode).completes((it) => it..equals(0));
7170
});
7271
}
7372

7473
test('start (pipe)', () async {
7574
final echo = childProcess.spawn('echo', ['Hello']);
7675
final proc = await processManager.start(['tee'], pipe: echo);
7776
unawaited(
78-
check(proc.stdout).withQueue.inOrder([
79-
it()
80-
// ignore: unawaited_futures
81-
..emits(it()..deepEquals(utf8.encode('Hello\n'))),
82-
// ignore: unawaited_futures
83-
it()..isDone(),
84-
]),
77+
expectLater(
78+
proc.stdout.map(String.fromCharCodes),
79+
emitsInOrder([
80+
'Hello\n',
81+
emitsDone,
82+
]),
83+
),
8584
);
8685
unawaited(check(proc.stderr).withQueue.isDone());
87-
await check(proc.exitCode).completes(it()..equals(0));
86+
await check(proc.exitCode).completes((it) => it..equals(0));
8887
});
8988
});
9089
});

packages/aft/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ dev_dependencies:
6767
amplify_lints: ">=2.0.2 <2.1.0"
6868
build_runner: ^2.4.9
6969
built_value_generator: 8.8.1
70-
checks: ^0.2.2
70+
checks: ^0.3.0
7171
json_serializable: 6.8.0
7272
test: ^1.22.1
7373
test_descriptor: ^2.0.1

packages/aft/test/config/config_loader_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ aft:
108108
'workingDirectory',
109109
).equals(workingDirectory)
110110
..has((config) => config.dependencies.toMap(), 'dependencies').which(
111-
it()
111+
(it) => it
112112
..containsKey('json_serializable')
113-
..not(it()..containsKey('built_value')),
113+
..not((it) => it..containsKey('built_value')),
114114
)
115115
..has((config) => config.scripts.toMap(), 'scripts').which(
116-
it()
116+
(it) => it
117117
..containsKey('license')
118118
..containsKey('format'),
119119
);

0 commit comments

Comments
 (0)