Framework
VaporTesting
VaporTesting is a set of utilities to make writing unit tests for Vapor applications easy.
Overview
For more details, check out the testing documentation.
Topics
Classes
Protocols
Structures
struct LiveClientOptionsHow the live test client talks to the running server.struct LiveTestOptionsHow aApplication.Method.runningtest runs: where the server binds, and how the client that talks to it is set up.struct MetricsTaskLocalTraitstruct TracingTaskLocalTrait
Variables
Functions
func expectJSONEquals<T>(String?, T, sourceLocation: SourceLocation)func withApp<T>(environment: Environment, configuration: ServerConfiguration, configReader: ConfigReader, logger: Logger, services: Application.ServiceConfiguration, configure: ((Application) async throws -> Void)?, (Application) async throws -> T) async throws -> TPerform a test while handling lifecycle of the application. Feel free to create a custom function like this, tailored to your project.