Skip to content

Commit

Permalink
add null throws test
Browse files Browse the repository at this point in the history
  • Loading branch information
kealjones-wk committed Oct 7, 2024
1 parent 86c0e50 commit b3ecc65
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions test/over_react/component/lazy_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,7 @@ main() {
});
});

group('null:', () {
sharedGenericTests(() {
return lazy(() async {
return uiFunction((props) {
return (Dom.div()
..addTestId('simple-lazy')
..addProps(props)
)('id: ${props.id}');
}, UiFactoryConfig());
}, null);
});
});

});

group('throws an error when', () {
Expand All @@ -143,6 +132,18 @@ main() {
),
throwsArgumentError);
});

test('it is null', () {
expect(
() => lazy(
() async => uiFunction<UiProps>(
(props) => (Dom.div()..addTestId('testId3'))('id: ${props.id}'),
UiFactoryConfig(),
),
null,
),
throwsArgumentError);
});
});
});

Expand Down

0 comments on commit b3ecc65

Please sign in to comment.