2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
- library dartdoc.dartdoc_integration_test;
5
+ @Timeout .factor (3 )
6
+ library ;
6
7
7
8
import 'dart:async' ;
8
9
import 'dart:io' ;
@@ -48,7 +49,7 @@ void main() {
48
49
contains ('package:test_package has no documentable libraries' )),
49
50
);
50
51
await process.shouldExit (0 );
51
- }, timeout : Timeout . factor ( 2 ) );
52
+ });
52
53
53
54
group ('invoking dartdoc on a basic package' , () {
54
55
late String packagePath;
@@ -70,7 +71,7 @@ void main() {
70
71
await process.shouldExit (0 );
71
72
var docs = Directory (path.join (packagePath, 'doc' , 'api' ));
72
73
expect (docs.existsSync (), isFalse);
73
- }, timeout : Timeout . factor ( 2 ) );
74
+ });
74
75
75
76
test ('with --quiet is quiet and does generate docs' , () async {
76
77
var process = await runDartdoc (
@@ -83,7 +84,7 @@ void main() {
83
84
await process.shouldExit (0 );
84
85
var indexHtml = Directory (path.join (packagePath, 'doc' , 'api' ));
85
86
expect (indexHtml.listSync (), isNotEmpty);
86
- }, timeout : Timeout . factor ( 2 ) );
87
+ });
87
88
88
89
test ('with invalid options return non-zero and print a fatal-error' ,
89
90
() async {
@@ -150,8 +151,8 @@ void main() {
150
151
emitsThrough (
151
152
'{"level":"WARNING","message":"Found 1 warning and 0 errors."}' ));
152
153
await process.shouldExit (0 );
153
- }, timeout : Timeout . factor ( 2 ) );
154
- }, timeout : Timeout . factor ( 8 ) );
154
+ });
155
+ });
155
156
156
157
test ('with tool errors cause non-zero exit when warnings are off' , () async {
157
158
// TODO(srawlins): Remove test_package_tool_error and generate afresh.
@@ -171,7 +172,7 @@ void main() {
171
172
workingDirectory: packagePath,
172
173
);
173
174
await process.shouldExit (1 );
174
- }, timeout : Timeout . factor ( 2 ) );
175
+ });
175
176
176
177
test ('with missing FLUTTER_ROOT exception reports an error' , () async {
177
178
// TODO(srawlins): Remove test_package_flutter_plugin and generate afresh.
@@ -185,10 +186,15 @@ void main() {
185
186
includeParentEnvironment: false ,
186
187
);
187
188
await expectLater (
188
- process.stderr,
189
- emitsThrough (matches (
190
- 'Top level package requires Flutter but FLUTTER_ROOT environment variable not set|'
191
- 'test_package_flutter_plugin requires the Flutter SDK, version solving failed' )));
189
+ process.stderr,
190
+ emitsThrough (
191
+ matches (
192
+ 'Top level package requires Flutter but FLUTTER_ROOT environment '
193
+ 'variable not set|test_package_flutter_plugin requires the Flutter '
194
+ 'SDK, version solving failed' ,
195
+ ),
196
+ ),
197
+ );
192
198
await process.shouldExit (1 );
193
199
});
194
200
}
0 commit comments