Don't log files that dont load throw error instead

remove swift-log dependency
This commit is contained in:
Adam Fowler
2021-03-18 15:25:46 +00:00
parent 4af21bb4cf
commit aa30dcbddf
4 changed files with 15 additions and 14 deletions

View File

@@ -11,7 +11,7 @@ final class LibraryTests: XCTestCase {
try data.write(to: URL(fileURLWithPath: "templates/test.mustache"))
defer { XCTAssertNoThrow(try fs.removeItem(atPath: "templates/test.mustache")) }
let library = HBMustacheLibrary(directory: "./templates")
let library = try HBMustacheLibrary(directory: "./templates")
let object = ["value": ["value1", "value2"]]
XCTAssertEqual(library.render(object, withTemplate: "test"), "<test><value>value1</value><value>value2</value></test>")
}