FactoryContext.test not detected in SPM tests
mbrandonw opened this issue · comments
Brandon Williams commented
If you run Factory's test suite through SPM using swift test
(rather than through Xcode) you will find that 2 tests fail:
$ swift test
FactoryContextTests.swift:55: error: XCTAssertEqual failed: ("REGISTERED") is not equal to ("TEST")
FactoryContextTests.swift:57: error: XCTAssertEqual failed: ("DEBUG") is not equal to ("TEST")
This is because isTesting
checks for an environment variable that Xcode provides, but swift
from the command line does not.
Michael Long commented
Think this is fixed in current 2.1.3 pre-release on main.