# QCKConfiguration

    final public class QCKConfiguration : NSObject

A configuration encapsulates various options you can use to configure Quick’s behavior.

- `runAllWhenEverythingFiltered`

  Run all examples if none match the configured filters. True by default.

  #### Declaration

  Swift

      public var runAllWhenEverythingFiltered: Bool

- `include(_:)`

  Registers an inclusion filter.

  All examples are filtered using all inclusion filters. The remaining examples are run. If no examples remain, all examples are run.

  #### Declaration

  Swift

      public func include(_ filter: @escaping ExampleFilter)

  #### Parameters

  `filter` | A filter that, given an example, returns a value indicating whether that example should be included in the examples that are run.

- `exclude(_:)`

  Registers an exclusion filter.

  All examples that remain after being filtered by the inclusion filters are then filtered via all exclusion filters.

  #### Declaration

  Swift

      public func exclude(_ filter: @escaping ExampleFilter)

  #### Parameters

  `filter` | A filter that, given an example, returns a value indicating whether that example should be excluded from the examples that are run.

- `objc_beforeEach(_:)`

  Undocumented

  #### Declaration

  Swift

      @objc(beforeEachWithMetadata:)
      public func objc_beforeEach(_ closure: @escaping BeforeExampleWithMetadataNonThrowingClosure)

- `beforeEach(_:)`

  Undocumented

  #### Declaration

  Swift

      @nonobjc
      public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure)

- `beforeEach(_:)`
- `beforeEach(_:)`

  Like Quick.DSL.beforeEach, this configures Quick to execute the given closure before each example that is run. The closure passed to this method is executed before each example Quick runs, globally across the test suite. You may call this method multiple times across multiple +[QuickConfigure configure:] methods in order to define several closures to run before each example.

  Note that, since Quick makes no guarantee as to the order in which +[QuickConfiguration configure:] methods are evaluated, there is no guarantee as to the order in which beforeEach closures are evaluated either. Multiple beforeEach defined on a single configuration, however, will be executed in the order they’re defined.

  Important

  This automatically bridges between async and sync specs. When running on AsyncSpecs, this closure will run on the main actor.

  #### Declaration

  Swift

      public func beforeEach(_ closure: @escaping BeforeExampleClosure)

  #### Parameters

  `closure` | The closure to be executed before each example in the test suite.

- `objc_afterEach(_:)`

  Undocumented

  #### Declaration

  Swift

      @objc(afterEachWithMetadata:)
      public func objc_afterEach(_ closure: @escaping AfterExampleWithMetadataNonThrowingClosure)

- `afterEach(_:)`

  Undocumented

  #### Declaration

  Swift

      @nonobjc
      public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure)

- `afterEach(_:)`
- `afterEach(_:)`

  Like Quick.DSL.afterEach, this configures Quick to execute the given closure after each example that is run. The closure passed to this method is executed after each example Quick runs, globally across the test suite. You may call this method multiple times across multiple +[QuickConfigure configure:] methods in order to define several closures to run after each example.

  Note that, since Quick makes no guarantee as to the order in which +[QuickConfiguration configure:] methods are evaluated, there is no guarantee as to the order in which afterEach closures are evaluated either. Multiple afterEach defined on a single configuration, however, will be executed in the order they’re defined.

  Important

  This automatically bridges between async and sync specs. When running on AsyncSpecs, this closure will run on the main actor.

  #### Declaration

  Swift

      public func afterEach(_ closure: @escaping AfterExampleClosure)

  #### Parameters

  `closure` | The closure to be executed before each example in the test suite.

- `aroundEach(_:)`

  Like Quick.DSL.aroundEach, this configures Quick to wrap each example with the given closure. The closure passed to this method will wrap all examples globally across the test suite. You may call this method multiple times across multiple +[QuickConfigure configure:] methods in order to define several closures to wrap all examples.

  Note that, since Quick makes no guarantee as to the order in which +[QuickConfiguration configure:] methods are evaluated, there is no guarantee as to the order in which aroundEach closures are evaluated. However, aroundEach does always guarantee proper nesting of operations: cleanup within aroundEach closures will always happen in the reverse order of setup.

  Warning

  Unlike `beforeEach` and `afterEach`, aroundEach does not automatically bridge between async and sync expectations.

  See also

  `aroundEach(_:)-6ptvt` for the async version.

  #### Declaration

  Swift

      public func aroundEach(_ closure: @escaping AroundExampleClosure)

  #### Parameters

  `closure` | The closure to be executed before each example in the test suite.

- `aroundEach(_:)`

  Like Quick.DSL.aroundEach, this configures Quick to wrap each example with the given closure. The closure passed to this method will wrap all examples globally across the test suite. You may call this method multiple times across multiple +[QuickConfigure configure:] methods in order to define several closures to wrap all examples.

  Note that, since Quick makes no guarantee as to the order in which +[QuickConfiguration configure:] methods are evaluated, there is no guarantee as to the order in which aroundEach closures are evaluated. However, aroundEach does always guarantee proper nesting of operations: cleanup within aroundEach closures will always happen in the reverse order of setup.

  Warning

  Unlike `beforeEach` and `afterEach`, aroundEach does not automatically bridge between async and sync expectations.

  See also

  `aroundEach(_:)` for the sync version.

  #### Declaration

  Swift

      public func aroundEach(_ closure: @escaping AroundExampleAsyncClosure)

  #### Parameters

  `closure` | The closure to be executed before each example in the test suite.

- `aroundEach(_:)`

  Identical to `aroundEach(_:)`, except the closure receives metadata about the example that the closure wraps.

  Warning

  Unlike `beforeEach` and `afterEach`, aroundEach does not automatically bridge between async and sync expectations.

  See also

  `aroundEach(_:)` for the async version.

  #### Declaration

  Swift

      public func aroundEach(_ closure: @escaping AroundExampleWithMetadataClosure)

- `aroundEach(_:)`

  Identical to `aroundEach(_:)`, except the closure receives metadata about the example that the closure wraps.

  Warning

  Unlike `beforeEach` and `afterEach`, aroundEach does not automatically bridge between async and sync expectations.

  See also

  `aroundEach(_:)` for the sync version.

  #### Declaration

  Swift

      public func aroundEach(_ closure: @escaping AroundExampleWithMetadataAsyncClosure)

- `beforeSuite(_:)`

  Like Quick.DSL.beforeSuite, this configures Quick to execute the given closure prior to any and all examples that are run. The two methods are functionally equivalent.

  Important

  This automatically bridges between async and sync specs. When running on AsyncSpecs, this closure will run on the main actor.

  #### Declaration

  Swift

      public func beforeSuite(_ closure: @escaping BeforeSuiteClosure)

- `afterSuite(_:)`

  Like Quick.DSL.afterSuite, this configures Quick to execute the given closure after all examples have been run. The two methods are functionally equivalent.

  Important

  This automatically bridges between async and sync specs. When running on AsyncSpecs, this closure will run on the main actor.

  #### Declaration

  Swift

      public func afterSuite(_ closure: @escaping AfterSuiteClosure)

© 2024 Quick Contributors. All rights reserved. (Last updated: 2024-07-23)

Generated by jazzy ♪♫ v0.14.4, a Realm project.