Hey!
There is currently no built-in way how to unit test helpers. What you could is to additionally define your helpers as a local Swift package and run tests using that.
Tuist/ProjectDescriptionHelpers
# Defines a local package that would test your ProjectDescriptionHelpers
Tuist/ProjectDescriptionHelpersTests/Package.swift
In the Package.swift
, you’d additionally need to import the ProjectDescription
framework – either by importing tuist/tuist
as a package or passing the right flags pointing to the ProjectDescription
installed on your system and invoke the tests using xcodebuild
(such as /Users/marekfort/.local/share/mise/installs/tuist/4.40.0/bin/ProjectDescription.framework
).
Alternatively, you can consider linting the generated project by running tuist graph --format json
and then ensuring your graph has the expected structure or build phases. The output JSON is an encoded variant of XcodeGraph that you can use as a Swift package and make the linting easier.