Skip to content

test: fix WPT runner result

This doesn't include the other tests in the result when running a specific test in WPT.

The following is a result tested with https://github.com/nodejs/node/pull/44234.

To-Be

$ node test/wpt/test-streams.js readable-byte-streams/bad-buffers-and-views.any.js

[PASS] ReadableStream with byte source: reading into a zero-length view on a non-zero-length buffer rejects
{
  "readable-byte-streams/bad-buffers-and-views.any.js": {
    "fail": {
      "expected": [
        "ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer is zero-length (in the readable state)"
      ]
    }
  }
}
Ran 1/1 tests, 0 skipped, 0 passed, 1 expected failures, 0 unexpected failures, 0 unexpected passes

As-Is

$ node test/wpt/test-streams.js readable-byte-streams/bad-buffers-and-views.any.js

[PASS] ReadableStream with byte source: reading into a zero-length view on a non-zero-length buffer rejects
{
  "readable-byte-streams/bad-buffers-and-views.any.js": {
    "fail": {
      "expected": [
        "ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer is zero-length (in the readable state)"
      ]
    }
  }
}
Ran 64/64 tests, 0 skipped, 63 passed, 1 expected failures, 0 unexpected failures, 7 unexpected passes
/home/daeyeon/code/daeyeon.node/test/common/wpt.js:546
        throw new Error(
        ^

Error: Found 7 unexpected passes. Consider updating test/wpt/status/streams.json for these files:
piping/abort.any.js
queuing-strategies.any.js
readable-byte-streams/general.any.js
readable-byte-streams/tee.any.js
readable-streams/default-reader.any.js
readable-streams/templated.any.js
writable-streams/aborting.any.js
    at process.<anonymous> (/home/daeyeon/code/daeyeon.node/test/common/wpt.js:546:15)
    at process.emit (node:events:525:35)

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

Merge request reports

Loading