Index: pkg/scheduled_test/test/scheduled_test/capture_stack_traces_test.dart |
diff --git a/pkg/scheduled_test/test/scheduled_test/capture_stack_traces_test.dart b/pkg/scheduled_test/test/scheduled_test/capture_stack_traces_test.dart |
index 6ea9e59f9baad2ee0864a3c807437a513ee8139a..25bba2043ddeef010546fd1955f435a39a4d0016 100644 |
--- a/pkg/scheduled_test/test/scheduled_test/capture_stack_traces_test.dart |
+++ b/pkg/scheduled_test/test/scheduled_test/capture_stack_traces_test.dart |
@@ -32,6 +32,7 @@ void main() { |
}, passing: ['test 2']); |
expectTestsPass('does not capture a stack trace if set to false', () { |
+ var errorThrown = new Object(); |
var error; |
test('test 1', () { |
currentSchedule.captureStackTraces = false; |
@@ -39,7 +40,7 @@ void main() { |
error = currentSchedule.errors.first; |
}); |
- schedule(() => throw 'error'); |
+ schedule(() => throw errorThrown); |
}); |
test('test 2', () { |