Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for socketio #44

Open
EArminjon opened this issue Dec 1, 2019 · 0 comments
Open

Test for socketio #44

EArminjon opened this issue Dec 1, 2019 · 0 comments

Comments

@EArminjon
Copy link

EArminjon commented Dec 1, 2019

Hello,

I would enable unit test for my project which use your socket package.
But the following error failed my tests :

The following assertion was thrown running a test:
A Timer is still pending even after the widget tree was disposed.
'package:flutter_test/src/binding.dart':
Failed assertion: line 1056 pos 7: '_currentFakeAsync.nonPeriodicTimerCount == 0'

My test :
I test if a widget can build. This widget contain socket_io and socket_io try to connect. My test do not take care of socket_io so i didn't want wait for connection...

Of can i do that :) ? Or how can i wait for connection ?

Test code :

void main() {
  testWidgets('Run app', (WidgetTester tester) async {
    // Build our app and trigger a frame.
    await tester.pumpWidget(App());
  });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants