November 2018
Intermediate to advanced
404 pages
10h 16m
English
In general, you want to create two executable targets for your project: one for the main application and another for the test application. Since Swift builds and runs one application at a time, you have to make your code testable by splitting the code into an application and library. The library will contain most of your business logic. The test executable file is separated from the main executable file. Both executable targets will be dependent on the core library you've just created.
In Package.swift of your Vapor 3 boilerplate project, you can see a test executable target defined:
.testTarget(: "AppTests", : ["App"])
This test target is named AppTests and it is dependent on a library ...
Read now
Unlock full access