Skip to content

Commit

Permalink
Update context test
Browse files Browse the repository at this point in the history
  • Loading branch information
sydneyjodon-wk committed Jan 31, 2025
1 parent af7c35e commit 015b5a8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/over_react/component/context_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void main() {
});
});

group('experimental calculateChangeBits argument functions correctly', () {
group('experimental calculateChangeBits argument does not throw when used (has no effect in React 18)', () {
late Ref<ContextProviderWrapperComponent?> providerRef;
int? consumerEvenValue;
int? consumerOddValue;
Expand Down Expand Up @@ -243,15 +243,14 @@ void main() {
});

test('on value updates', () {
// Test common behavior between React 17 (calculateChangedBits working)
// and React 18 (it having no effect).
providerRef.current!.increment();
expect(consumerEvenValue, 2);
expect(consumerOddValue, 1);
providerRef.current!.increment();
expect(consumerEvenValue, 2);
expect(consumerOddValue, 3);
providerRef.current!.increment();
expect(consumerEvenValue, 4);
expect(consumerOddValue, 3);
});
});
});
Expand Down

0 comments on commit 015b5a8

Please sign in to comment.