Skip to content

Commit 4c47b2a

Browse files
committed
fix: Remove force unwrapping in UT
1 parent 30ddd60 commit 4c47b2a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CodeUITests/CodeUITests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ import XCTest
1212

1313
final class CodeUITests: XCTestCase {
1414

15-
override func setUpWithError() throws {
15+
override func setUp() {
1616
// Clean all UserDefaults
17-
UserDefaults.standard.removePersistentDomain(forName: Bundle.main.bundleIdentifier!)
17+
if let bundleIdentifier = Bundle.main.bundleIdentifier {
18+
UserDefaults.standard.removePersistentDomain(forName: bundleIdentifier)
19+
}
1820
}
1921

2022
// https://github.com/thebaselab/codeapp/issues/746

0 commit comments

Comments
 (0)