Reset the global variable before running a test. (#46203)

The variable debugDisableShadows wasn't reset before each test, so the
output of the test is different depending on whether the previous test
has passed.
This commit is contained in:
Lau Ching Jun 2019-12-12 10:37:42 -08:00 committed by GitHub
parent 535526b03c
commit be53bc14aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,10 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:flutter/material.dart';
void main() {
tearDown(() {
debugDisableShadows = true;
});
testWidgets('Shadows on BoxDecoration', (WidgetTester tester) async {
await tester.pumpWidget(
Center(