Issues Found When We ran Flutter unit tests

Aperta
#184 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
dart, flutter

Direzione di ricerca

Esegui flutter test dalla directory locale del progetto e inizia con test/service_tests/api_service_test.dart. Traccia gli errori di compilazione segnalati di modal_bottom_sheet e conferma che il conflitto tra le dipendenze e gli errori di tipo siano risolti quando la suite di test viene caricata ed eseguita correttamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

  • Some tests failed when flutter unit tests for the rutorrent-flutter application.
  • These issues were found due to the modal_bottom_sheet dependency used.
  • We can run flutter test in the local directory of the project to reproduce the issue.
Issues found
00:01 +0: ...Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart     ../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.0/lib/src/material_with_modal_page_route.dart:4:1
: Error: 'ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart'
and 'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
import '../modal_bottom_sheet.dart';
^^^^^^^^^^^^^^^^^^^^^
00:04 +0: ...Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart     ../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.0/lib/src/bottom_sheets/material_bottom_sheet.dar
t:28:13: Error: 'ModalBottomSheetRoute' is imported from both
'package:flutter/src/material/bottom_sheet.dart' and
'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
      .push(ModalBottomSheetRoute<T>(
            ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.0/lib/src/bottom_sheets/material_bottom_sheet.dar
t:50:10: Error: A value of type 'Object?' can't be returned from an async function with return type
'Future<T?>'.
 - 'Object' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
  return result;
         ^
../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.0/lib/src/bottom_sheets/bar_bottom_sheet.dart:99:
13: Error: 'ModalBottomSheetRoute' is imported from both
'package:flutter/src/material/bottom_sheet.dart' and
'package:modal_bottom_sheet/src/bottom_sheet_route.dart'.
      .push(ModalBottomSheetRoute<T>(
            ^^^^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.0/lib/src/bottom_sheets/bar_bottom_sheet.dart:121
:10: Error: A value of type 'Object?' can't be returned from an async function with return type
'Future<T?>'.
 - 'Object' is from 'dart:core'.
 - 'Future' is from 'dart:async'.
  return result;
         ^
00:06 +0 -1: loading /Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart [E]
  Failed to load "/Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart": Compilation failed for testPath=/Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart

To run this test again: /Users/manoj/flutter/bin/cache/dart-sdk/bin/dart test /Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart -p vm --plain-name 'loading /Users/manoj/Downloads/rutorrent-flutter-main/test/service_tests/api_service_test.dart'
  Exception: the Dart compiler exited unexpectedly.
  package:flutter_tools/src/base/common.dart 10:3  throwToolExit
  package:flutter_tools/src/compile.dart 831:9     DefaultResidentCompiler._compile.<fn>
  dart:async/zone.dart 1406:47                     _rootRunUnary
  dart:async/zone.dart 1307:19                     _CustomZone.runUnary
  
00:11 +1 -1: Some tests failed.                                            
Lingua principale
Dart
Stelle
131
Fork
113
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CCExtractor/rutorrent-flutter

Tutte le issue di CCExtractor/rutorrent-flutter

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.