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
thrownewTypeError(`Test attachment requires "body" or "path" to be set. Both are missing.`)
173
181
}
182
+
174
183
if(attachment.body&&attachment.path){
175
184
thrownewTypeError(`Test attachment requires only one of "body" or "path" to be set. Both are specified.`)
176
185
}
177
-
annotation.attachment=attachment
186
+
178
187
// convert to a string so it's easier to serialise
179
188
if(attachment.bodyinstanceofUint8Array){
180
189
attachment.body=encodeUint8Array(attachment.body)
181
190
}
182
191
}
183
-
if(location){
184
-
annotation.location=location
185
-
}
186
192
193
+
returnannotation
194
+
}
195
+
196
+
asyncfunctionannotate(
197
+
annotation: TestAnnotation,
198
+
){
187
199
if(!runner.onTestAnnotate){
188
200
thrownewError(`Test runner doesn't support test annotations.`)
189
201
}
@@ -200,33 +212,29 @@ export function createTestContext(
200
212
thrownewError(`Cannot annotate tests outside of the test run. The test "${test.name}" finished running with the "${test.result.state}" state already.`)
0 commit comments