This issue still exists when executing unit tests in Xcode 11.6. However, the workaround from eskimo does work for me! Although it is not the Documents directory of the app, a Documents directory will be created and the tests succeed.
let documentsURL = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
Post
Replies
Boosts
Views
Activity
Same here. I filed a Feedback about this issue: FB9178663 and mirrored it on OpenRadar.