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 Quick/Quick to v7 #9

Merged
merged 1 commit into from
May 21, 2023
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 21, 2023

Mend Renovate

This PR contains the following updates:

Package Update Change
Quick/Quick major from: "v2.2.1" -> from: "v7.0.0"

Release Notes

Quick/Quick

v7.0.0: - AsyncSpec and Human-Readable Test Selectors

Compare Source

Highlights

Async Test Changes

Quick 7 changes how Async tests are run. Instead of forcing all tests to run in an async context, Quick 7 provides a separate Spec class for Async Tests. Create an AsyncSpec subclass, and all tests inside of that subclass will run in an async context. Tests inside of QuickSpec subclasses will have a similar behavior to what was in Quick 5.

Additionally, Quick 7 changes how the DSL is defined slightly. In Quick 6 and before, the DSL was defined as a series of global functions, available to be called anywhere. In Quick 7, these functions were moved to be static methods on the new SyncDSLUser (which QuickSpec, Behavior, and QuickConfiguration conform to) and AsyncDSLUser (which AsyncSpec and AsyncBehavior conform to) protocols. This allows us to make sure that you are using the correct DSL for the context, and was necessary for this approach.

For example:

class SynchronousSpec: QuickSpec {
    override class func spec() {
        it("runs synchronously, as you'd expect") {
            var ocean: [String] = []
            DispatchQueue.main.async {
                ocean.append("dolphins")
                ocean.append("whales")
            }
            expect(ocean).toEventually(contain("dolphins", "whales"))
        }
    }
}

class AsynchronousSpec: AsyncSpec {
    override class func spec() {
        it("runs the test in an async context") {
            var ocean: [String] = []
            DispatchQueue.main.async {
                ocean.append("dolphins")
                ocean.append("whales")
            }
            await expect(ocean).toEventually(contain("dolphins", "whales"))
        }
    }
}

Unencoded Test Selectors

Furthermore, Quick 7 changes how test selectors are generated for QuickSpec. Now, both AsyncSpec and QuickSpec will use the unencoded test names as the test selectors. Test selectors are now generated by joining the describe/context blocks leading up to the it block with ", ". This makes test names immensely easier to read. For example, with the following spec:

class MySpec: QuickSpec {
    override class func spec() {
        describe("some feature") {
            context("in one case") {
                it("has a behavior") {}
            }

            context("in another case") {
                it("doesn't have the earlier behavior") {}
            }
        }
    }
}

will generate the following test selectors:

  • some feature, in one case, has a behavior
  • some feature, in another case, doesn't have the earlier behavior

You can disable this change by setting the QUICK_USE_ENCODED_TEST_SELECTOR_NAMES environment variable.

Migrating Suggestions

Quick 7 is not a drop-in migration from either Quick 5 or Quick 6. Quick 5 users will have a slightly easier time upgrading, but due to spec being defined as a class method instead of an instance method, there will still be changes.

Doing a Find & Replace of override func spec with override class func spec will take care of the low-hanging fruit. If you have any test helpers that exist as properties or methods of your QuickSpec subclasses, the you will need to either move them inside of the spec function, or outside to another scope. For Objective-C users, this is, for the most part, a drop-in replacement. You will only need to do anything if you do not use the QuickSpecBegin and QuickSpecEnd macros (in which case: do a find & replace of the regex -(\s*)\(void\)(\s*)spec with +$1(void)$2spec).

For migrating from Quick 6 to Quick 7, it would be easiest to also do a Find & Replace of : QuickSpec to : AsyncSpec, then migrate tests that do not need to run in async contexts to be QuickSpecs themselves.

Auto-Generated Changelog

What's Changed

New Contributors

Full Changelog: Quick/Quick@v6.1.0...v7.0.0

v6.1.0

Compare Source

Highlighted Changes

  • New TestState property wrapper (Thanks @​CraigSiemens!). You can now wrap properties with @TestState to have them automatically set to nil.
  • Objective-C API is no longer available in Swift, this should reduce confusion whether a test is being executed in an async context or not.
  • This release drops support for Swift 5.6/Xcode 13.3.1.

Auto-generated Release Notes

What's Changed

New Contributors

Full Changelog: Quick/Quick@v6.0.1...v6.1.0

v6.0.1

Compare Source

What's Changed

Full Changelog: Quick/Quick@v6.0.0...v6.0.1

v6.0.0

Compare Source

This closes the v6.0.0 milestone.

Highlights

See additional details under the auto-generated release notes below.

Fixed

New

var ordering: [Int] = []
beforeEach {
    ordering.append(1)
}

justBeforeEach {
    ordering.append(3)
}

beforeEach {
    ordering.append(2)
}

it("runs justBeforeEach after the other beforeEach's") {
    expect(ordering).to(equal([1, 2, 3]))
}

Breaking

  • This version raises minimum required version to Swift 5.6, and required OS to macOS 10.15, iOS 13, and tvOS 13.
  • aroundEach is removed from the Objective-C API https://github.com/Quick/Quick/pull/1160
  • Again, with the async support, all tests now run in an async context. This will require you to make changes, especially if you use Nimble.

Auto-Generated Release Notes

What's Changed

New Contributors

Full Changelog: Quick/Quick@v5.0.1...v6.0.0

v5.0.1

Compare Source

This release closes the v5.0.1 milestone.

What's Changed

Full Changelog: Quick/Quick@v5.0.0...v5.0.1

v5.0.0

Compare Source

This release closes the v5.0.0 milestone.

Highlights

See additional details under the auto-generated release notes below.

Fixed

New

Breaking

  • Rename Configuration -> QCKConfiguration #​1133
  • Make FilterFlags implementation detail #​1068

Auto-generated release notes

What's Changed

New Contributors

Full Changelog: Quick/Quick@v4.0.0...v5.0.0

v4.0.0

Compare Source

Quick v4 has been released! 🎉 The new major version requires Swift 5.2 / Xcode 11.4 at least.

BREAKING CHANGES

  • Bump minimum iOS version to 9.0 #​1013
  • Rename master branch to main #​1052

Changes

  • [CI] Test Xcode 12 and Swift 5.3 #​1010
  • Set ENABLE_TESTING_SEARCH_PATHS to YES #​1011
  • Upgrade Project Format to Xcode 11.4-compatible #​1012 (Thanks @​mRs-)
  • [CI] Use rake directly instead of travis-script-macos #​1019
  • Update Nimble to 9.1.0 #​1020, #​1062, #​1066
  • Xcode 12.0: Update to recommended settings #​1021
  • Address deprecation warnings in Xcode 12 #​1040
  • Migrate Linux CI from Travis to GitHub Actions #​1042
  • [CI] Use norionomura/swift Docker images for Linux CI #​1043
  • [SwiftLint] Enable yoda_condition rule #​1044
  • [CI] Use the official Swift Docker images #​1049
  • [CI] Split ci.yml into dedicated workflows #​1050
  • Tweak CI workflows regarding fkirc/skip-duplicate-actions and matrix testing #​1051
  • Xcode 12.5: Update to recommended settings #​1063
  • [CI] Update Xcode and Swift versions #​1064

Documentation Changes

Miscellaneous

v3.1.2

Compare Source

Changes

  • [SwiftPM] Address warnings on Swift 5.3 or above #​1048

v3.1.1

Compare Source

Bugfixes

  • Fix a compile error with the SwiftPM-generated Xcode project #​1023, #​1045

v3.1.0

Compare Source

Changes

v3.0.1

Compare Source

Changes

  • Add Package@swift-5.3.swift to bump minimum iOS version for SwiftPM users #​1037
  • Update Nimble to 9.0.0 #​1020, #​1037

v3.0.0

Compare Source

Quick v3 has been released! 🎉 The new major version requires Swift 5.2 / Xcode 11.4 at least.

BREAKING CHANGES

  • Bump Swift requirement to 5.2 (Xcode 11.4 or later) #​986

New Features

  • it/fit/xit closures are now marked as throws, so you can throw Errors and the test fails if they do throw #​680 (Thanks @​marcelofabri)
    •   it("should fail") {
            try throwingFunc()
        }
      

Changes

  • Parallelize CI builds more (Take 2) #​987
  • Update Nimble to 9.0.0-rc.1 #​988

Bugfixes

  • Delegate recordFailure to QuickSpec.current #​990

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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/quick-quick-7.x branch from 020d6a7 to a7e69c0 Compare May 21, 2023 14:03
@renovate renovate bot force-pushed the renovate/quick-quick-7.x branch from a7e69c0 to 6e4c0a0 Compare May 21, 2023 14:03
@philprime philprime merged commit a0427e2 into main May 21, 2023
@philprime philprime deleted the renovate/quick-quick-7.x branch May 21, 2023 14:04
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.

1 participant