Skip to content

Commit 4b9e40b

Browse files
Add note about --dir . to XCTest instructions
1 parent 207d8d8 commit 4b9e40b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/getting-started/testing.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@ using `SwiftPM`. After your tests are built, you can use a WASI-compatible host
7171
[wasmtime](https://wasmtime.dev/) to run the test bundle:
7272

7373
```sh
74-
$ wasmtime .build/wasm32-unknown-wasi/debug/ExamplePackageTests.wasm
74+
$ wasmtime --dir . .build/wasm32-unknown-wasi/debug/ExamplePackageTests.wasm
7575
```
7676

77+
(`--dir .` is used to allow XCTest to find `Bundle.main` resources placed alongside the executable file.)
78+
7779
As you can see, the produced test binary starts with the name of your package followed by
7880
`PackageTests.wasm`. It is located in the `.build/debug` subdirectory, or in the `.build/release`
7981
subdirectory when you build in release mode.

0 commit comments

Comments
 (0)