bow-swift/nef

`nef` testing

miguelangel-dev opened this issue · 0 comments

Description

Add testing support to nef to reduce the boilerplate for using XCTests (or any third party library).

Example of use

we could add to our Swift Playground something like:

import XCTest

class ExampleTests: XCTestCase {

    func testHelloWorld_Success() {
        let helloWorld = "Hello World!"
        XCTAssertEqual(helloWorld, "Hello World!")
    }

    func testHelloWorld_Failure() {
        let helloWorld = "Hello World!"
        XCTAssertEqual(helloWorld, "Hello World! - Failure")
    }
}

and launch this TestCase using nef as follow:

Nef.run(testCase: ExampleTests.self)

in this example, the output will be:

Captura de pantalla 2019-04-22 a las 17 56 27

As you can see, test failures and final state for test suit is remarked.