Skip to content

Commit 7cba8f1

Browse files
Fix setUp issue
1 parent a4b33bc commit 7cba8f1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/over_react_test/common_component_util_test.dart

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,16 @@ main() {
106106
'before consumer setUpAll blocks are called');
107107
});
108108

109+
int setUpCallCount = 0;
109110
setUp(() {
110-
expect(wasFactoryCalled, isFalse,
111-
reason: 'factory arg was called within group, '
112-
'before consumer setUp blocks are called');
111+
// Only do this the first time, since it gets called before every
112+
// test inside commonComponentTests.
113+
if (setUpCallCount == 0) {
114+
expect(wasFactoryCalled, isFalse,
115+
reason: 'factory arg was called within group, '
116+
'before consumer setUp blocks are called');
117+
}
118+
setUpCallCount++;
113119
});
114120

115121
commonComponentTests(() {

0 commit comments

Comments
 (0)