Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis committed Dec 12, 2024
1 parent 285e871 commit e435bd7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Tests/SharingTests/FileStorageTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,15 @@
try withDependencies {
$0.defaultFileStorage = .inMemory(fileSystem: fileSystem)
} operation: {
@Shared(.fileStorage(.fileURL)) var users = [User]()
let loadError = try #require($users.loadError)
#expect(loadError is DecodingError)
$users.withLock { $0.append(User(id: 1, name: "Blob")) }
#expect($users.loadError == nil)
try withKnownIssue {
@Shared(.fileStorage(.fileURL)) var users = [User]()
let loadError = try #require($users.loadError)
#expect(loadError is DecodingError)
$users.withLock { $0.append(User(id: 1, name: "Blob")) }
#expect($users.loadError == nil)
} matching: {
$0.error is DecodingError
}
}
}

Expand Down

0 comments on commit e435bd7

Please sign in to comment.