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
Protocols
Functions
func expectContains(String?, String?, fileID: String, filePath: String, line: Int, column: Int)func expectContent<D>(D.Type, TestingHTTPResponse, fileID: String, filePath: String, line: Int, column: Int, (D) throws -> ()) rethrowsfunc expectJSONEquals<T>(String?, T, fileID: String, filePath: String, line: Int, column: Int)func withApp<T>((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.func withApp<T>(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.