diff --git a/Binaries/PrefireBinary.artifactbundle/info.json b/Binaries/PrefireBinary.artifactbundle/info.json index da05e2a..020eff8 100644 --- a/Binaries/PrefireBinary.artifactbundle/info.json +++ b/Binaries/PrefireBinary.artifactbundle/info.json @@ -3,10 +3,10 @@ "artifacts": { "PrefireBinary": { "type": "executable", - "version": "2.9.0", + "version": "2.9.1", "variants": [ { - "path": "prefire-2.9.0-macos/bin/prefire", + "path": "prefire-2.9.1-macos/bin/prefire", "supportedTriples": ["x86_64-apple-macosx", "arm64-apple-macosx"] }, ] diff --git a/Binaries/PrefireBinary.artifactbundle/prefire-2.9.0-macos/bin/prefire b/Binaries/PrefireBinary.artifactbundle/prefire-2.9.1-macos/bin/prefire similarity index 68% rename from Binaries/PrefireBinary.artifactbundle/prefire-2.9.0-macos/bin/prefire rename to Binaries/PrefireBinary.artifactbundle/prefire-2.9.1-macos/bin/prefire index 0c6df3d..55311f5 100755 Binary files a/Binaries/PrefireBinary.artifactbundle/prefire-2.9.0-macos/bin/prefire and b/Binaries/PrefireBinary.artifactbundle/prefire-2.9.1-macos/bin/prefire differ diff --git a/PrefireExecutable/Sources/prefire/Commands/Version/Version.swift b/PrefireExecutable/Sources/prefire/Commands/Version/Version.swift index 24cb3ea..e39447c 100644 --- a/PrefireExecutable/Sources/prefire/Commands/Version/Version.swift +++ b/PrefireExecutable/Sources/prefire/Commands/Version/Version.swift @@ -5,7 +5,7 @@ extension Prefire { struct Version: ParsableCommand { static let configuration = CommandConfiguration(abstract: "Display the current version of Prefire") - static var value: String = "2.9.0" + static var value: String = "2.9.1" func run() throws { print(Self.value) diff --git a/PrefireExecutable/Sources/prefire/Previews/PreviewLoader+Tests.swift b/PrefireExecutable/Sources/prefire/Previews/PreviewLoader+Tests.swift index d45e13d..f362661 100644 --- a/PrefireExecutable/Sources/prefire/Previews/PreviewLoader+Tests.swift +++ b/PrefireExecutable/Sources/prefire/Previews/PreviewLoader+Tests.swift @@ -21,15 +21,27 @@ extension PreviewLoader { let isScreen = rawPreviewModel.traits == ".device" let componentTestName = rawPreviewModel.displayName.components(separatedBy: funcCharacterSet).joined() - return + let assertionStatement: String + if isScreen { + assertionStatement = """ + if let failure = assertSnapshots(matching: preview(), name: "\(rawPreviewModel.displayName)", isScreen: \(isScreen), device: deviceConfig) { + XCTFail(failure) + } + """ + } else { + // Ensure we call on the test looping devices: + assertionStatement = """ + assertSnapshots(matching: preview, testName: "\(rawPreviewModel.displayName)") + """ + } + + return """ func test_\(componentTestName)_Preview() { let preview = { \(rawPreviewModel.body) } - if let failure = assertSnapshots(matching: preview(), name: "\(rawPreviewModel.displayName)", isScreen: \(isScreen), device: deviceConfig) { - XCTFail(failure) - } + \(assertionStatement) } """ }