Skip to content

Commit

Permalink
fix: mock widget to handle sinout erorr
Browse files Browse the repository at this point in the history
  • Loading branch information
dshukertjr committed Aug 1, 2022
1 parent 2fa4ece commit 84844e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/widget_test_stubs.dart
Expand Up @@ -17,8 +17,10 @@ class _MockWidgetState extends State<MockWidget> {
Widget build(BuildContext context) {
return isSignedIn
? TextButton(
onPressed: () {
Supabase.instance.client.auth.signOut();
onPressed: () async {
try {
await Supabase.instance.client.auth.signOut();
} catch (_) {}
},
child: const Text('Sign out'),
)
Expand Down

0 comments on commit 84844e2

Please sign in to comment.