Chromium Code Reviews| Index: pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart |
| diff --git a/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart b/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart |
| index 048745ddbea01962ea143e10181ebf1d7e6832d9..749ec6e5e841330e587fb12e5d4c3de599289581 100644 |
| --- a/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart |
| +++ b/pkg/scheduled_test/test/scheduled_test/current_schedule_errors_test.dart |
| @@ -2,6 +2,8 @@ |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| +import 'dart:async'; |
| + |
| import 'package:scheduled_test/scheduled_test.dart'; |
| import 'package:scheduled_test/src/mock_clock.dart' as mock_clock; |
| @@ -13,6 +15,16 @@ void main(_, message) { |
| setUpTimeout(); |
| + expectTests('a scheduled test with an out-of-band error should fail', () { |
| + test('test 1', () { |
| + sleep(5).then((_) => throw 'error'); |
|
nweiz
2014/04/10 00:58:15
If you're going to use [sleep] like this, you need
|
| + }); |
| + |
| + test('test 2', () { |
| + return sleep(10); |
| + }); |
| + }, {'test 1': ERROR, 'test 2': PASS}); |
| + |
| expectTestsPass('currentSchedule.errors contains the error in the onComplete ' |
| 'queue', () { |
| var errors; |