Type Aliases

The following type aliases are available globally.

  • Undocumented

    Declaration

    Swift

    public typealias FileString = String
  • A closure that temporarily exposes a QCKConfiguration object within the scope of the closure.

    Declaration

    Swift

    public typealias QuickConfigurer = (_ configuration: QCKConfiguration) -> Void
  • A closure that, given metadata about an example, returns a boolean value indicating whether that example should be run.

    Declaration

    Swift

    public typealias ExampleFilter = (_ example: Example) -> Bool

Example Hooks

  • A closure executed before an example is run.

    Declaration

    Swift

    public typealias BeforeExampleClosure = () -> Void
  • A closure executed before an example is run. The closure is given example metadata, which contains information about the example that is about to be run.

    Declaration

    Swift

    public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> Void
  • A closure executed after an example is run.

    Declaration

    Swift

    public typealias AfterExampleClosure = BeforeExampleClosure
  • A closure executed after an example is run. The closure is given example metadata, which contains information about the example that has just finished running.

    Declaration

    Swift

    public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClosure
  • A closure which wraps an example. The closure must call runExample() exactly once.

    Declaration

    Swift

    public typealias AroundExampleClosure = (_ runExample: @escaping () -> Void) -> Void
  • A closure which wraps an example. The closure is given example metadata, which contains information about the example that the wrapper will run. The closure must call runExample() exactly once.

    Declaration

    Swift

    public typealias AroundExampleWithMetadataClosure =
        (_ exampleMetadata: ExampleMetadata, _ runExample: @escaping () -> Void) -> Void

Suite Hooks

  • A closure executed before any examples are run.

    Declaration

    Swift

    public typealias BeforeSuiteClosure = () -> Void
  • A closure executed after all examples have finished running.

    Declaration

    Swift

    public typealias AfterSuiteClosure = BeforeSuiteClosure
  • A closure that, when evaluated, returns a dictionary of key-value pairs that can be accessed from within a group of shared examples.

    Declaration

    Swift

    public typealias SharedExampleContext = () -> [String : Any]
  • A closure that is used to define a group of shared examples. This closure may contain any number of example and example groups.

    Declaration

    Swift

    public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> Void