Skip to content

Commit

Permalink
Clean up unnecessary LHS types (ReactElement, final variables)
Browse files Browse the repository at this point in the history
  • Loading branch information
greglittlefield-wf committed Nov 17, 2023
1 parent 51f47d0 commit e514c58
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void sharedErrorBoundaryTests(BuilderOnlyUiFactory<ErrorBoundaryPropsMixin> buil

group('when a new child is passed in', () {
test('', () {
final ReactElement? newDummyChild = (Dom.div()..addTestId('newDummyChild'))('hi there');
final newDummyChild = (Dom.div()..addTestId('newDummyChild'))('hi there');
jacket!.rerender((builder()
..addProps(ErrorBoundaryPropsMapView({})
..fallbackUIRenderer = (_, __) => (Dom.div()..addTestId('fallbackNode'))('Something went wrong')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void sharedErrorBoundaryTests(BuilderOnlyUiFactory<v2.ErrorBoundaryProps> builde

group('when a new child is passed in', () {
test('', () {
final ReactElement? newDummyChild = (Dom.div()..addTestId('newDummyChild'))('hi there');
final newDummyChild = (Dom.div()..addTestId('newDummyChild'))('hi there');
jacket!.rerender((builder()
..fallbackUIRenderer = (_, __) => (Dom.div()..addTestId('fallbackNode'))('Something went wrong')
)(newDummyChild));
Expand Down
4 changes: 2 additions & 2 deletions test/over_react/component/with_transition_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ main() {
});

test('more than one child', () {
final ReactElement? child1 = Dom.div()('one');
final ReactElement? child2 = Dom.div()('two');
final child1 = Dom.div()('one');
final child2 = Dom.div()('two');
expect(() => mount(WithTransition()(
child1,
child2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ main() {
// where auto-detecting the subtypeOf arg resulted in the UiFactory itself
// being treated as the subtype, causing type checking to fail.
test('works when subtyping a component whose factory hasn\'t been initialized yet', () {
final react_interop.ReactElement? element = function.TestUninitializedParent()();
final element = function.TestUninitializedParent()();
expect(isComponentOfType(element, function.DoNotReferenceThisFactoryExceptForInASingleTest), isTrue);
expect(isComponentOfType(element, TestAbstract2Component), isTrue);
});
Expand Down

0 comments on commit e514c58

Please sign in to comment.