[shared_preferences] Test can detect that SharedPreferences is mocked.#4433
[shared_preferences] Test can detect that SharedPreferences is mocked.#4433hu1buerger wants to merge 1 commit intoflutter:masterfrom
Conversation
45861f5 to
869e4ba
Compare
Checking wheter a integration test using shared_preferences as the storage backend should be able to check that the current instance is mocked. Not checking could result in overriding could override app runtime data or calling [setMockInitialValues] could lead to overriding data from the test. Updated pubspecVersion and changelog.md closes #1 fixing formating Merge to latest master Bump compileSdkVersion to 31 (flutter#4432)
de85829 to
ab4c38d
Compare
This is not correct; could you provide the correct issue link please? It's not clear to me from the description here what problem this is solving—I'm not sure what the case is where you are mocking values but don't know that you are mocking values—so an issue with more details is needed here. It's also not clear to me why this needs a new API, rather than checking |
|
@stuartmorgan hu1buerger#1 here's the issue |
That's an issue in your own repository, not a Flutter issue, and it doesn't address the questions in my comment. |
|
Thank you for your contribution. I'm going to close this PR for now since there are outstanding comments, just to get this off our PR review queue. Please don't hesitate to submit a new PR if you have the time to address the review comments. Thanks! |
Checking wheter a integration test using shared_preferences as the
storage backend should be able to check that the current instance is mocked.
Not checking could result in overriding could override app runtime data
or calling [setMockInitialValues] could lead to overriding data from the
test.
closes #1
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. You must list at least one issue.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
dart format.)[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.