I have json file that I want to include in the test bundle so I can just read this json for my tests.
So I created a file called "test.json", it is in my Tests folder.
Now I want to read this file. I am reading it like this, the code here is in the test file in test bundle:
let bundle = Bundle(for: type(of: self))
var url = bundle.url(forResource: "test", withExtension: "json")
the url is nil every single time. I swear that file is there, if I open it in finder, it's under the same directory as the test-info.plist. I even tried the main bundle but it is still nil!!
Where is this file????