forked from eatvio/eatvio_app
feat(tests): fixed tests
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
import 'package:eatvio_app/core/app_config.dart';
|
||||
import 'package:eatvio_app/core/app_initializer.dart';
|
||||
import 'package:eatvio_app/core/env_config.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:eatvio_app/core/locator_service.dart';
|
||||
import 'package:eatvio_app/features/video_calls/presentation/bloc/video_call_session/video_call_session_cubit.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
|
||||
class _MockVideoCallSessionCubit extends Mock implements VideoCallSessionCubit {}
|
||||
|
||||
void main() {
|
||||
setUpAll(() async {
|
||||
@@ -11,6 +16,17 @@ void main() {
|
||||
dotenv.loadFromString(envString: 'DEV_BASE_URL=http://localhost\nBASE_URL=http://localhost');
|
||||
});
|
||||
|
||||
setUp(() async {
|
||||
await sl.reset();
|
||||
sl.registerLazySingleton<VideoCallSessionCubit>(
|
||||
_MockVideoCallSessionCubit.new,
|
||||
);
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
await sl.reset();
|
||||
});
|
||||
|
||||
group('AppConfig', () {
|
||||
test('creates config with prod build type', () {
|
||||
final config = AppConfig(buildType: AppBuildType.prod);
|
||||
|
||||
Reference in New Issue
Block a user