Skip to content

test(swift): add unit test cases for extension functions #4894

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

Conversation

5d
Copy link

@5d 5d commented May 15, 2024

Issue #, if available:

Description of changes:

  • add unit test cases for extension functions

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@5d 5d requested a review from a team as a code owner May 15, 2024 19:42
@5d 5d force-pushed the 5d/datastore-spm-swift-helper-functions-unit-test branch from 94b54d7 to bc5fa5a Compare May 15, 2024 21:33
Copy link
Member

@Jordan-Nelson Jordan-Nelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look fine but the tests are failing in CI

subject.send(completion: .finished)
}

await fulfillment(of: [expectation1, expectation2, expectation3], timeout: 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests are failing in CI with the message

❌  /Users/runner/work/amplify-flutter/amplify-flutter/packages/amplify_datastore/example/ios/unit_tests/PublisherExtensionTests.swift:39:15: cannot find 'fulfillment' in scope

Copy link
Author

@5d 5d May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing @Jordan-Nelson.

The API fulfillment mentioned in the error log was introduced in Xcode 14.3.

As discussed with @Equartey, to utilize the datastore v2, flutter will need to update the CI GitHub runner to macOS-14 or macOS-14-arm64, as the minimum supported version for datastore v2 has been updated to Swift 5.9.

@Equartey Equartey force-pushed the 5d/datastore-spm-swift-helper-functions-unit-test branch from 4929406 to 3b8478f Compare May 29, 2024 14:00
Co-authored-by: Jordan Nelson <Jordanryannelson@gmail.com>
@Equartey Equartey merged commit 77556a4 into feat/datastore-spm-migration May 29, 2024
3 checks passed
@Equartey Equartey deleted the 5d/datastore-spm-swift-helper-functions-unit-test branch May 29, 2024 16:31
Equartey pushed a commit to Equartey/amplify-flutter that referenced this pull request May 29, 2024
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.

4 participants