github.com/nestproject/NestTest

Simple testing tool for Nest


License
BSD-2-Clause

Documentation

NestTest

Simple testing tool for Nest.

Usage

import NestTest

// Create a test client with our Nest application "hello"
let client = TestClient(hello)

let response = client.get("/")
assert(response.body == "Hello World")

let response = client.post("/", body: "Kyle")
assert(response.body == "Hello Kyle")

Spectre

try expect(client.get("/").body) == "Hello World"

XCTest

XCTAssertEqual(client.get("/").body, "Hello World")