Unverified Commit 514701fe authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

Remove test group in favour of addTearDown (#17962)

parent 7c60b740
......@@ -18,7 +18,7 @@ When the exception was thrown, this was the stack:
The test description was:
TestAsyncUtils - handling unguarded async helper functions
════════════════════════════════════════════════════════════════════════════════════════════════════
.*..:.. \+0 -1: - TestAsyncUtils - handling unguarded async helper functions *
.*..:.. \+0 -1: TestAsyncUtils - handling unguarded async helper functions *
Test failed\. See exception logs above\.
The test description was: TestAsyncUtils - handling unguarded async helper functions
*
......
......@@ -9,7 +9,7 @@ There was one transient callback left. The stack trace for when it was registere
#[0-9]+ main.+ \(.+/dev/automated_tests/flutter_test/ticker_test\.dart:[0-9]+:[0-9]+\)
<<skip until matching line>>
════════════════════════════════════════════════════════════════════════════════════════════════════
.*..:.. \+0 -1: - Does flutter_test catch leaking tickers\? \[E\]
.*..:.. \+0 -1: Does flutter_test catch leaking tickers\? \[E\]
Test failed\. See exception logs above\.
The test description was: Does flutter_test catch leaking tickers\?
*
......
[0-9]+:[0-9]+ [+]0: - A trivial widget test
[0-9]+:[0-9]+ [+]0: A trivial widget test
[0-9]+:[0-9]+ [+]1: All tests passed!
......@@ -57,20 +57,19 @@ void testWidgets(String description, WidgetTesterCallback callback, {
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
final WidgetTester tester = new WidgetTester._(binding);
timeout ??= binding.defaultTestTimeout;
test_package.group('-', () {
test_package.test(
description,
() {
return binding.runTest(
() => callback(tester),
tester._endOfTestVerifications,
description: description ?? '',
);
},
skip: skip,
);
test_package.tearDown(binding.postTest);
}, timeout: timeout);
description,
() {
test_package.addTearDown(binding.postTest);
return binding.runTest(
() => callback(tester),
tester._endOfTestVerifications,
description: description ?? '',
);
},
skip: skip,
timeout: timeout
);
}
/// Runs the [callback] inside the Flutter benchmark environment.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment