Same here. I filed a Feedback about this issue: FB9178663 and mirrored it on OpenRadar.
Post
Replies
Boosts
Views
Activity
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)