| Index: pkg/scheduled_test/lib/src/scheduled_future_matchers.dart
|
| diff --git a/pkg/scheduled_test/lib/src/scheduled_future_matchers.dart b/pkg/scheduled_test/lib/src/scheduled_future_matchers.dart
|
| index 4e1d0ffb469456a86899577eddf15689157a3f66..83609f552517ec5ccde001d1788dd90aa9967c64 100644
|
| --- a/pkg/scheduled_test/lib/src/scheduled_future_matchers.dart
|
| +++ b/pkg/scheduled_test/lib/src/scheduled_future_matchers.dart
|
| @@ -6,6 +6,8 @@ library scheduled_future_matchers;
|
|
|
| import 'dart:async';
|
|
|
| +import 'package:stack_trace/stack_trace.dart';
|
| +
|
| import '../scheduled_test.dart';
|
|
|
| /// Matches a [Future] that completes successfully with a value. Note that this
|
| @@ -60,8 +62,15 @@ class _ScheduledCompletes extends BaseMatcher {
|
| }
|
| }
|
|
|
| + var outerTrace = new Trace.current();
|
| currentSchedule.wrapFuture(item.then((value) {
|
| - if (_matcher != null) expect(value, _matcher);
|
| + if (_matcher == null) return;
|
| +
|
| + try {
|
| + expect(value, _matcher);
|
| + } catch (e, stackTrace) {
|
| + throw new AsyncError(e, outerTrace);
|
| + }
|
| }), description);
|
|
|
| return true;
|
|
|