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 [nfc]: Add shorter name "testBinding" for TestZulipBinding.instance #271

Merged
merged 3 commits into from
Aug 15, 2023

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Aug 15, 2023

We use this a lot in our tests, and its name is kind of uncomfortably
long for that. Make it shorter.

In particular if in a test one wants the test binding object for
Flutter itself (the TestWidgetsFlutterBinding), that's spelled
tester.binding (where tester is the argument passed to the
testWidgets callback). So this makes our own test binding object
be comparably accessible, as testBinding.


These cleanups originated in my draft branch for notifications, #122 / #123. There's still significant work for me to do before that branch is ready, but these seem independently helpful as we write more tests that use the global store or Flutter plugins.

We use this a lot in our tests, and its name is kind of uncomfortably
long for that.  Make it shorter.

In particular if in a test one wants the test binding object for
Flutter itself (the TestWidgetsFlutterBinding), that's spelled
`tester.binding` (where `tester` is the argument passed to the
`testWidgets` callback).  So this makes our own test binding object
be comparably accessible, as `testBinding`.
In particular make the name appropriately specific about what's being
launched, since we're exporting it from this more general context.
@chrisbobbe chrisbobbe merged commit 6dba863 into zulip:main Aug 15, 2023
@chrisbobbe
Copy link
Collaborator

LGTM, thanks! Merged.

@gnprice gnprice deleted the pr-binding branch August 15, 2023 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants