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

Fix up unit tests & run them in CI #336

Merged
merged 12 commits into from
Oct 31, 2022
Merged

Fix up unit tests & run them in CI #336

merged 12 commits into from
Oct 31, 2022

Conversation

robrbecker
Copy link
Member

@robrbecker robrbecker commented Oct 28, 2022

Turns out tests were not being run in github actions, and were a bit broken. So this PR gets tests fixed up and running in CI.
Using mockito to mock the network request calls which return a non-nullable generic type was proving challenging even when using custom shims, so a different approach of using the nock package to mock our network requests was used. This turns out to be really nice and also verifies the the request is right because the request must match the mocked request or it fails. This means all of the basic tests in git_tests that just verify that getJSON are called with the correct URL are at least as good as before (verifying the URL matched expected) plus they exercise the deserialization pieces of code.

@robrbecker robrbecker added the semver:minor Non-Breaking Public API Changes (additions) label Oct 28, 2022
- added a makefile
- added ocktokit scenarios
- fixed up git_test.dart
- actually run tests in CI
@robrbecker robrbecker changed the title WIP Fix tests Fix up unit tests & run them in CI Oct 31, 2022
@robrbecker robrbecker added semver:patch Bug fixes, no public API changes and removed semver:minor Non-Breaking Public API Changes (additions) labels Oct 31, 2022
@robrbecker robrbecker marked this pull request as ready for review October 31, 2022 14:25
@robrbecker
Copy link
Member Author

FYI @CaseyHillers

@robrbecker robrbecker merged commit b9f545a into master Oct 31, 2022
@robrbecker robrbecker deleted the fix_tests branch October 31, 2022 14:28
@robrbecker
Copy link
Member Author

This was referenced Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released semver:patch Bug fixes, no public API changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant