Avatar
またまた質問です!snapshot test を書きたいのですが、snapshot test 用の text file の absolute filepath をどう取得すれば良いのでしょうか? イメージ let bundle = Bundle(for: type(of: self)) guard let url = bundle.url(forResource: "Tests/Structs/Snapshots/snapshot-1/input", withExtension: "json") else { throw NSError(domain: "error", code: 0); // ここで Error } let jsonData = try String(contentsOf: url); print(jsonData); (edited)