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

[Bug]: Dart API tests are failing (and meaningless) #131

Open
2 tasks done
ChristianEdwardPadilla opened this issue Sep 26, 2024 · 1 comment
Open
2 tasks done

[Bug]: Dart API tests are failing (and meaningless) #131

ChristianEdwardPadilla opened this issue Sep 26, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ChristianEdwardPadilla
Copy link

Description

The Dart API tests for this plugin (located here: https://github.com/ThexXTURBOXx/flutter_web_auth_2/blob/master/flutter_web_auth_2/test/flutter_web_auth_2_test.dart) have a couple problems:

  1. The 'invalid scheme' test fails.
  2. The tests are inherently meaningless because they only test the mock defined in the setUp call.

Minimal Reproduction

To reproduce: run the tests.

Exception or Error

Expected: throws <Instance of 'ArgumentError'>
Actual: <Instance of 'Future<String>'>
   Which: threw PlatformException:<PlatformException(error, Expected: 'foobar'
                  Actual: 'foobar://test'
                   Which: is different. Both strings start the same, but the actual value also has the following trailing characters: ://test
                , null, null)>

Expected Behaviour

The tests should pass and they should verify the behavior of the actual implementation, not a mock.

Screenshots

No response

Additional context

No response

Device

NA

OS

NA

Browser

NA

Flutter version

NA

flutter_web_auth_2 version

NA

Checklist

  • I have read and followed the entire troubleshooting guide and it has not provided the solution I need.
  • I have provided all the information I can.
@ThexXTURBOXx
Copy link
Owner

Thanks for the bug report! Yes, indeed, I am not really using the tests and hence barely edit/update them. They are also not really important when it comes to this package. Far more important is the example (which acts as a sort of manual integration test).
Maybe, I will fix the tests at some point, but they really have a low priority for me at least :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants