Add support for custom test error reporters (#17727)
This allows test environments other than `flutter test` to have a hook into the test exception reporting. Some test environments, for example, don't just dump error details to the console, but rather require them to be reported to a separate server.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('tests must restore the value of reportTestException', (WidgetTester tester) async {
|
||||
// This test is expected to fail.
|
||||
reportTestException = (FlutterErrorDetails details, String testDescription) {};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user