forked from eatvio/eatvio_app
refactor(tests): replace 'final' with 'const' for improved performance in various test files
This commit is contained in:
@@ -34,7 +34,7 @@ void main() {
|
||||
Widget createTestWidget(FeedConsultantModel consultant) {
|
||||
return MaterialApp.router(
|
||||
theme: ThemeHelper().themeData(),
|
||||
localizationsDelegates: [
|
||||
localizationsDelegates: const [
|
||||
S.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
@@ -66,7 +66,7 @@ void main() {
|
||||
|
||||
testWidgets('displays consultant information', (tester) async {
|
||||
await mockNetworkImagesFor(() async {
|
||||
final consultant = FeedConsultantModel(
|
||||
const consultant = FeedConsultantModel(
|
||||
slug: 'test-consultant',
|
||||
name: 'Test Consultant',
|
||||
photo: 'https://example.com/photo.jpg',
|
||||
@@ -87,7 +87,7 @@ void main() {
|
||||
|
||||
testWidgets('displays consultant with badges', (tester) async {
|
||||
await mockNetworkImagesFor(() async {
|
||||
final consultant = FeedConsultantModel(
|
||||
const consultant = FeedConsultantModel(
|
||||
slug: 'test-consultant',
|
||||
name: 'Test Consultant',
|
||||
photo: 'https://example.com/photo.jpg',
|
||||
@@ -110,7 +110,7 @@ void main() {
|
||||
|
||||
testWidgets('displays rating place', (tester) async {
|
||||
await mockNetworkImagesFor(() async {
|
||||
final consultant = FeedConsultantModel(
|
||||
const consultant = FeedConsultantModel(
|
||||
slug: 'test-consultant',
|
||||
name: 'Test Consultant',
|
||||
photo: 'https://example.com/photo.jpg',
|
||||
@@ -129,7 +129,7 @@ void main() {
|
||||
|
||||
testWidgets('handles photo with https URL', (tester) async {
|
||||
await mockNetworkImagesFor(() async {
|
||||
final consultant = FeedConsultantModel(
|
||||
const consultant = FeedConsultantModel(
|
||||
slug: 'test-consultant',
|
||||
name: 'Test Consultant',
|
||||
photo: 'https://example.com/photo.jpg',
|
||||
@@ -148,7 +148,7 @@ void main() {
|
||||
|
||||
testWidgets('handles photo without https URL', (tester) async {
|
||||
await mockNetworkImagesFor(() async {
|
||||
final consultant = FeedConsultantModel(
|
||||
const consultant = FeedConsultantModel(
|
||||
slug: 'test-consultant',
|
||||
name: 'Test Consultant',
|
||||
photo: '/storage/photo.jpg',
|
||||
|
||||
Reference in New Issue
Block a user