Skip to content

Conversation

@Zohenn
Copy link
Contributor

@Zohenn Zohenn commented Jul 19, 2022

Implemented get method for MockDatabaseReference. This is by no means the most performant code, but it gets the job done. I basically took the existing code for once, extracted most of it into a separate method and then used it to return MockDataSnapshot.

I added an additional test for MockDataSnapshot, but I didn't test the new method, since it's basically the same as once. At least as long as it supports DatabaseEventType.value only.

@Zohenn
Copy link
Contributor Author

Zohenn commented Jul 20, 2022

uses: subosito/flutter-action@v1

Perhaps changing this to uses: subosito/flutter-action@v2 might help for the failing build? Or you could try to build on Ubuntu instead of MacOS.

@sitatec sitatec self-requested a review July 24, 2022 14:02
@sitatec
Copy link
Owner

sitatec commented Jul 24, 2022

Thanks @Zohenn for the PR. We need to resolve one conflict to merge it.

@Zohenn
Copy link
Contributor Author

Zohenn commented Jul 25, 2022

@sitatec done. I will try to implement other methods, though it needs a bit more work in order to not repeat the code. It should be done better than in this PR, so you can actually test this. I suppose you're not working on anything related to this package at the moment?

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2022

Codecov Report

Merging #7 (9472f48) into main (d5a95c8) will increase coverage by 0.83%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main       #7      +/-   ##
==========================================
+ Coverage   94.11%   94.94%   +0.83%     
==========================================
  Files           4        4              
  Lines          85       99      +14     
==========================================
+ Hits           80       94      +14     
  Misses          5        5              
Impacted Files Coverage Δ
lib/src/mock_data_snapshot.dart 100.00% <100.00%> (ø)
lib/src/mock_database_reference.dart 94.87% <100.00%> (+0.58%) ⬆️
lib/src/mock_firebase_database.dart 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sitatec
Copy link
Owner

sitatec commented Jul 31, 2022

@Zohenn no, I haven't worked on something related to this package for a while.
I will try to write some unit tests on this PR before merging to not reduce the coverage

@Zohenn
Copy link
Contributor Author

Zohenn commented Jul 31, 2022

@sitatec I can do it too, will get it done today. The coverage will still decrease a bit anyway. It's just a metric after all.

@Zohenn
Copy link
Contributor Author

Zohenn commented Jul 31, 2022

@sitatec Could you run Codecov now?
I have also added coverage directory from Android Studio to .gitignore and removed pubspec.lock, as per https://dart.dev/guides/libraries/private-files#pubspeclock.

@Zohenn
Copy link
Contributor Author

Zohenn commented Aug 14, 2022

@sitatec Could you please take a look at this, or at least publish a new version to pub.dev with contents of #6 in it? It prevents me (and probably others) from updating other dependencies.

@sitatec sitatec merged commit 7b895be into sitatec:main Aug 14, 2022
@Zohenn
Copy link
Contributor Author

Zohenn commented Aug 14, 2022

Huge thanks man!

@sitatec
Copy link
Owner

sitatec commented Aug 14, 2022

I just published the new version to pub.dev

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.

3 participants