Skip to content

Commit 6134b03

Browse files
committed
fix test example for linux
1 parent 1f093b9 commit 6134b03

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Examples/Testing/Tests/HandlerTests.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@ public struct HandlerTest {
3232
public func invokeHandler() async throws {
3333

3434
// read event.json file
35-
let testBundle = Bundle.module
36-
guard let eventURL = testBundle.url(forResource: "event", withExtension: "json") else {
37-
Issue.record("event.json not found in test bundle")
38-
return
39-
}
35+
let eventURL = URL(fileURLWithPath: #filePath)
36+
.deletingLastPathComponent()
37+
.appendingPathComponent("event.json")
4038
let eventData = try Data(contentsOf: eventURL)
4139

4240
// decode the event

0 commit comments

Comments
 (0)