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

Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.6" #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 29, 2023

This PR contains the following updates:

Package Update Change
pointfreeco/swift-snapshot-testing minor from: "1.11.0" -> from: "1.17.6"

Release Notes

pointfreeco/swift-snapshot-testing (pointfreeco/swift-snapshot-testing)

v1.17.6

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.17.5...1.17.6

v1.17.5

Compare Source

What's Changed

New Contributors

Full Changelog: pointfreeco/swift-snapshot-testing@1.17.4...1.17.5

v1.17.4

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.17.3...1.17.4

v1.17.3

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.17.2...1.17.3

v1.17.2

Compare Source

What's Changed

  • Fixed: SwiftSyntax dependency has been updated to point to the new swiftlang organization on GitHub, preventing warnings when used with other libraries targeting the same updated organization.

Full Changelog: pointfreeco/swift-snapshot-testing@1.17.1...1.17.2

v1.17.1

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.17.0...1.17.1

v1.17.0

Compare Source

What's Changed

See the migration guide for more information.

New Contributors

Full Changelog: pointfreeco/swift-snapshot-testing@1.16.2...1.17.0

v1.16.2

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.16.1...1.16.2

v1.16.1

Compare Source

What's Changed

New Contributors

Full Changelog: pointfreeco/swift-snapshot-testing@1.16.0...1.16.1

v1.16.0

Compare Source

What's Changed

New Contributors

Full Changelog: pointfreeco/swift-snapshot-testing@1.15.4...1.16.0

v1.15.4

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.15.3...1.15.4

v1.15.3

Compare Source

What's Changed

  • Fixed: Inline snapshots in test files containing a leading, whitespace-only line will no longer include this newline as leading trivia in the recording.

Full Changelog: pointfreeco/swift-snapshot-testing@1.15.2...1.15.3

v1.15.2

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.15.1...1.15.2

v1.15.1

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.15.0...1.15.1

v1.15.0

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.14.2...1.15.0

v1.14.2

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.14.1...1.14.2

v1.14.1

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.14.0...1.14.1

v1.14.0

Compare Source

What's Changed

New Contributors

Full Changelog: pointfreeco/swift-snapshot-testing@1.13.0...1.14.0

v1.13.0

Compare Source

What's Changed

  • Added: Inline Snapshot Testing (https://github.com/pointfreeco/swift-snapshot-testing/pull/764). This allows your text-based snapshots to live right in the test source code, rather than in an external file:

    inline-snapshot

    While the library has had experimental support for this feature since 1.5.0 thanks to @​rjchatfield (https://github.com/pointfreeco/swift-snapshot-testing/pull/199), we've finally put the finishing touches to it:

    • Inline snapshot testing is available in a separate InlineSnapshotTesting module. To use inline snapshot testing, add a dependency on this module and update your existing imports:

      -import SnapshotTesting
      +import InlineSnapshotTesting

      The feature has been rewritten to use SwiftSyntax. While a heavyweight dependency, it is a more reasonable tool for generating Swift code than string substitution, and will be an increasingly common dependency as the de facto tool for writing Swift macros.

      The main SnapshotTesting module does not depend on SwiftSyntax, so existing snapshot tests will not incur cost of compiling SwiftSyntax.

    • The API now follows the same structure as assertSnapshot, except it uses a trailing closure to capture the inline snapshot. This makes it easy to update an existing snapshot test to use inline snapshots:

      -assertSnapshot(of: user, as: .json)
      +assertInlineSnapshot(of: user, as .json)

      After this assertion runs, the test source code is updated in place:

      assertInlineSnapshot(of: user, as: .json) {
        """
        {
          "id" : 42,
          "isAdmin" : true,
          "name" : "Blob"
        }
        """
      }

      These trailing closures are easy to select in Xcode in order to delete and re-record a snapshot: simply double-click one of the braces to highlight the closure, delete, and run the test.

    • Inline snapshotting's assertInlineSnapshot testing tool is fully customizable so that you can build your own testing helpers on top of it without your users even knowing they are using snapshot testing. In fact, we do this to create a testing tool that helps us test the Swift code that powers Point-Free. It's called assertRequest, and it allows you to simultaneously assert the request being made to the server (including URL, query parameters, headers, POST body) as well as the response from the server (including status code and headers).

      For example, to test that when a request is made for a user to join a team subscription, we can write the following:

      await assertRequest(
        connection(
          from: request(
            to: .teamInviteCode(.join(code: subscription.teamInviteCode, email: nil)),
            session: .loggedIn(as: currentUser)
          )
        )
      )

      And when we first run the test it will automatically expand:

      await assertRequest(
        connection(
          from: request(
            to: .teamInviteCode(.join(code: subscription.teamInviteCode, email: nil)),
            session: .loggedIn(as: currentUser)
          )
        )
      ) {
        """
        POST http://localhost:8080/join/subscriptions-team_invite_code3
        Cookie: pf_session={"userId":"00000000-0000-0000-0000-000000000001"}
        """
      } response: {
        """
        302 Found
        Location: /account
        Referrer-Policy: strict-origin-when-cross-origin
        Set-Cookie: pf_session={"flash":{"message":"You now have access to Point-Free!","priority":"notice"},"userId":"00000000-0000-0000-0000-000000000001"}; Expires=Sat, 29 Jan 2028 00:00:00 GMT; Path=/
        X-Content-Type-Options: nosniff
        X-Download-Options: noopen
        X-Frame-Options: SAMEORIGIN
        X-Permitted-Cross-Domain-Policies: none
        X-XSS-Protection: 1; mode=block
        """
      }

      This shows that the response redirects the use back to their account page and shows them the flash message that they now have full access to Point-Free. This makes writing complex and nuanced tests incredibly easy, and so there is no reason to not write lots of tests for all the subtle edge cases of your application's logic.

  • Added: DocC documentation (#​765). The SnapshotTesting and InlineSnapshotTesting are fully documented using DocC.

  • Infrastructure: swift-format support (#​765). The library is now auto-formatted using swift-format.

Full Changelog: pointfreeco/swift-snapshot-testing@1.12.0...0.13.0

v1.12.0

Compare Source

What's Changed

New Contributors

Full Changelog: pointfreeco/swift-snapshot-testing@1.11.1...1.12.0

v1.11.1

Compare Source

What's Changed

Full Changelog: pointfreeco/swift-snapshot-testing@1.11.0...1.11.1


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.11.1" Update dependency pointfreeco/swift-snapshot-testing to from: "1.12.0" Aug 31, 2023
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from 7966464 to afe3201 Compare August 31, 2023 00:51
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.12.0" Update dependency pointfreeco/swift-snapshot-testing to from: "1.13.0" Sep 12, 2023
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from afe3201 to 0d6cbb3 Compare September 12, 2023 22:56
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.13.0" Update dependency pointfreeco/swift-snapshot-testing to from: "1.14.0" Oct 3, 2023
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from 0d6cbb3 to cc6ad6c Compare October 3, 2023 00:09
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.14.0" Update dependency pointfreeco/swift-snapshot-testing to from: "1.14.1" Oct 6, 2023
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from cc6ad6c to d2ceec6 Compare October 6, 2023 21:29
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.14.1" Update dependency pointfreeco/swift-snapshot-testing to from: "1.14.2" Oct 13, 2023
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from d2ceec6 to 160798b Compare October 13, 2023 22:06
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.14.2" Update dependency pointfreeco/swift-snapshot-testing to from: "1.15.0" Nov 15, 2023
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from 160798b to 919f214 Compare November 15, 2023 00:34
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.15.0" Update dependency pointfreeco/swift-snapshot-testing to from: "1.15.1" Nov 27, 2023
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from 919f214 to e48dbee Compare November 27, 2023 21:31
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from e48dbee to 60a3032 Compare January 8, 2024 21:51
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.15.1" Update dependency pointfreeco/swift-snapshot-testing to from: "1.15.2" Jan 8, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from 60a3032 to 5142cd0 Compare February 1, 2024 23:33
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.15.2" Update dependency pointfreeco/swift-snapshot-testing to from: "1.15.3" Feb 1, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from 5142cd0 to d8aaa98 Compare March 4, 2024 22:51
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.15.3" Update dependency pointfreeco/swift-snapshot-testing to from: "1.15.4" Mar 4, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from d8aaa98 to 5c2e89a Compare April 5, 2024 23:46
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.15.4" Update dependency pointfreeco/swift-snapshot-testing to from: "1.16.0" Apr 5, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from 5c2e89a to f927eef Compare June 12, 2024 20:38
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.16.0" Update dependency pointfreeco/swift-snapshot-testing to from: "1.16.1" Jun 12, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from f927eef to 3cba906 Compare July 3, 2024 14:08
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.16.1" Update dependency pointfreeco/swift-snapshot-testing to from: "1.16.2" Jul 3, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from 3cba906 to c4b198c Compare July 8, 2024 22:36
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.16.2" Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.0" Jul 8, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from c4b198c to ef78ed0 Compare July 9, 2024 18:56
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.0" Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.1" Jul 9, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from ef78ed0 to 7c954f6 Compare July 12, 2024 21:28
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.1" Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.2" Jul 12, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from 7c954f6 to f68515f Compare August 2, 2024 00:53
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.2" Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.3" Aug 2, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from f68515f to c84ece7 Compare August 7, 2024 22:14
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.3" Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.4" Aug 7, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from c84ece7 to d5e2141 Compare September 12, 2024 17:14
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.4" Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.5" Sep 12, 2024
@renovate renovate bot force-pushed the renovate/pointfreeco-swift-snapshot-testing-1.x branch from d5e2141 to 4a69389 Compare October 21, 2024 19:20
@renovate renovate bot changed the title Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.5" Update dependency pointfreeco/swift-snapshot-testing to from: "1.17.6" Oct 21, 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.

0 participants