Skip to content

Commit b8b5c6c

Browse files
fixup!: add getXFail to TestStream
1 parent cb03a42 commit b8b5c6c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/internal/test_runner/test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,8 @@ class Test extends AsyncResource {
13521352
directive = this.reporter.getSkip(this.message);
13531353
} else if (this.isTodo) {
13541354
directive = this.reporter.getTodo(this.message);
1355+
} else if (this.xfail) {
1356+
directive = this.reporter.getXFail(); // TODO(@JakobJingleheimer): support expected failure
13551357
}
13561358

13571359
if (this.reportedType) {

lib/internal/test_runner/tests_stream.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ class TestsStream extends Readable {
8787
return { __proto__: null, todo: reason ?? true };
8888
}
8989

90+
getXFail(expectation = undefined) {
91+
return { __proto__: null, xfail: expectation ?? true };
92+
}
93+
9094
enqueue(nesting, loc, name, type) {
9195
this[kEmitMessage]('test:enqueue', {
9296
__proto__: null,

0 commit comments

Comments
 (0)