You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,23 @@ asyncButtonElement.onclick = .object(JSClosure { _ in
125
125
_= document.body.appendChild(asyncButtonElement)
126
126
```
127
127
128
+
### `JavaScriptEventLoop` activation in XCTest suites
129
+
130
+
If you need to execute Swift async functions that can be resumed by JS event loop in your XCTest suites, please add `JavaScriptEventLoopTestSupport` to your test target dependencies.
131
+
132
+
```diff
133
+
.testTarget(
134
+
name: "MyAppTests",
135
+
dependencies: [
136
+
"MyApp",
137
+
+ "JavaScriptEventLoopTestSupport",
138
+
]
139
+
)
140
+
```
141
+
142
+
Linking this module automatically activates JS event loop based global executor by calling `JavaScriptEventLoop.installGlobalExecutor()`
0 commit comments