Skip to content

Commit

Permalink
fix tests and swiftlint
Browse files Browse the repository at this point in the history
  • Loading branch information
yusuftor committed Jan 30, 2025
1 parent 5d6a5d2 commit 6a3da5e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
9 changes: 3 additions & 6 deletions Sources/SuperwallKit/Config/ConfigLogic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ enum ConfigLogic {

// If there's only one variant, return it.
if variants.count == 1,
let variant = variants.first
{
let variant = variants.first {
return variant.toExperimentVariant()
}

Expand Down Expand Up @@ -292,8 +291,7 @@ enum ConfigLogic {

for variant in preloadableVariants {
if variant.type == .treatment,
let paywallId = variant.paywallId
{
let paywallId = variant.paywallId {
identifiers.insert(paywallId)
}
}
Expand All @@ -316,8 +314,7 @@ enum ConfigLogic {
continue
}
if variant.type == .treatment,
let paywallId = variant.paywallId
{
let paywallId = variant.paywallId {
identifiers.insert(paywallId)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ extension Superwall {
Logger.debug(
logLevel: .info,
scope: .paywallPresentation,
message: "Timeout: Superwall.shared.subscriptionStatus has not been set for over 5 seconds resulting in a failure."
message: "Timeout: Superwall.shared.subscriptionStatus has not been set "
+ "for over 5 seconds resulting in a failure."
)
let error = InternalPresentationLogic.presentationError(
domain: "SWKPresentationError",
Expand Down
2 changes: 1 addition & 1 deletion Tests/SuperwallKitTests/Config/ConfigLogicTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class ConfigLogicTests: XCTestCase {
.setting(\.percentage, to: 0),
]
let variant = try ConfigLogic.chooseVariant(from: options)
XCTAssertEqual(options.first!.toVariant(), variant)
XCTAssertEqual(options.first!.toExperimentVariant(), variant)
} catch {
XCTFail("Shouldn't fail")
}
Expand Down

0 comments on commit 6a3da5e

Please sign in to comment.