flutter/dev/integration_tests/flutter_gallery/test/flutter_test_config.dart
2021-12-10 10:09:24 -08:00

22 lines
815 B
Dart

// Copyright 2014 The Flutter 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 'dart:async';
import 'package:flutter/rendering.dart';
import 'package:flutter_goldens/flutter_goldens.dart' as flutter_goldens show testExecutable;
import 'package:flutter_test/flutter_test.dart';
Future<void> testExecutable(FutureOr<void> Function() testMain) {
// Enable extra checks since this package exercises a lot of the framework.
debugCheckIntrinsicSizes = true;
// Make tap() et al fail if the given finder specifies a widget that would not
// receive the event.
WidgetController.hitTestWarningShouldBeFatal = true;
// Enable golden file testing using Skia Gold.
return flutter_goldens.testExecutable(testMain);
}