OSS TanbouSign in with GitHub

express Swift test expectations with expect, matchers, and polling assertions

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
4,836
Primary language
Swift
License
Apache-2.0
Repository last updated
May 4, 2026
On this page

Overview

Nimble is a matcher framework for Swift and Objective-C. It expresses value, collection, boolean, and asynchronous expectations using expect(...).to(...), making XCTest and Swift Testing failures easier to read.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Express values, collections, and conditions through matchers

Matchers such as equal, beCloseTo, contain, and beTruthy provide a readable vocabulary for expectations. Nimble can be used with Quick or directly from a test target.

Sources: [2]

Use polling expectations such as toEventually for asynchronous state

Polling expectations validate values that change asynchronously. Version 14.0.0 reimplements polling by calculating the number of attempts first, aiming to remove a source of flakiness under heavily loaded CI and parallel testing.

Sources: [2][4]

Best fit

Fits XCTest or Swift Testing suites that want domain-readable assertions

It is useful when values, collections, and asynchronous state should use reusable matchers with clearer intent and failure messages than ad hoc assertions.

Sources: [2]

Before adoption

Nimble 14 deprecates synchronous polling APIs and belongs only in test targets

Version 14 deprecates synchronous Swift polling expectations and synchronous waitUntil in favor of async APIs. The README also says to link Nimble to the unit test target, not the app target. Package.swift uses Swift tools 6.0 and declares iOS 13+.

Sources: [4][2][3]

Official sources

  1. [1]Quick/Nimble — GitHub repository(2026-10-06)
  2. [2]Nimble v14.0.0 — README(2026-10-06)
  3. [3]Nimble v14.0.0 — Package.swift(2026-10-06)
  4. [4]Nimble v14.0.0 release(2026-10-06)
  5. [5]Nimble Apache-2.0 license(2026-10-06)
Supplemental curator note

Nimble fits XCTest and Swift Testing suites that want readable matcher-based assertions. Version 14 deprecates synchronous polling expectations, so existing suites should identify migrations to async APIs.

Try it in 3 steps

  1. 1

    Add Nimble 14.0.0 as a test dependency

    Add Nimble only to the unit test target. Version 14.0.0 supports iOS 13+.

    .package(url: "https://github.com/Quick/Nimble.git", exact: "14.0.0")
  2. 2

    Assert values with expect and matchers

    Follow the README examples and express value and string expectations through matchers.

    import Nimble expect(1 + 1).to(equal(2)) expect("seahorse").to(contain("sea"))
  3. 3

    Wait for asynchronous state with polling

    Use the async polling form because Nimble 14 deprecates synchronous Swift polling expectations.

    await expect { state.isReady }.toEventually(beTrue())
Check the official README

Growth

Growth trends · Last 30 days

4,836 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
0
Open PRs
10

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • matcher-functions
  • swift-generics
  • swift-assertions
  • failure-messages
  • asynchronous-expectations
  • swift
  • testing
  • operator-overloads
  • bdd
Stars
4,836
Forks
607
Watchers
85
Open issues
20
Contributors
117
Owner type
Organization
Primary language
Swift
License
Apache-2.0
Repository last updated
May 4, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?