This repository was archived by the owner on Jul 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "description" : " WIP support for WHATWG Stream in Node" ,
55 "main" : " index.js" ,
66 "scripts" : {
7- "test" : " echo \" Error: no test specified \" && exit 1 "
7+ "test" : " node --expose-internals --expose_gc test/wpt/test.js "
88 },
99 "repository" : {
1010 "type" : " git" ,
1616 "url" : " https://github.com/nodejs/whatwg-stream/issues"
1717 },
1818 "homepage" : " https://github.com/nodejs/whatwg-stream#readme" ,
19+ "engines" : {
20+ "node" : " >= 15"
21+ },
1922 "dependencies" : {
2023 "web-streams-polyfill" : " ^3.0.2"
2124 }
Original file line number Diff line number Diff line change 1+ {
2+ "piping/pipe-through.any.js" : {
3+ "fail" : " Node does not perform a brand check for AbortSignal.prototype.aborted"
4+ },
5+ "queuing-strategies-size-function-per-global.window.js" : {
6+ "skip" : " test requires an <iframe>"
7+ },
8+ "readable-byte-streams/bad-buffers-and-views.any.js" : {
9+ "skip" : " Node does not have detached ArrayBuffers"
10+ },
11+ "transferable/deserialize-error.window.js" : {
12+ "skip" : " test requires an <iframe>"
13+ }
14+ }
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ // Flags: --expose-internals --expose_gc
4+ // Note:
5+ // - The --expose-internals flag is specific to Node.js core's
6+ // internal error system and is unnecessary for external users.
7+ // - The --expose_gc flag is specific to the WPT stream tests
8+
9+ const { WPTRunner } = require ( '../common/wpt' ) ;
10+ const runner = new WPTRunner ( 'streams' ) ;
11+ const whatwgStreamPath = require . resolve ( '../../' ) ;
12+
13+ runner . setFlags ( [ '--expose-internals' ] ) ;
14+
15+ runner . setInitScript ( `
16+ const { internalBinding } = require('internal/test/binding');
17+ const { DOMException } = internalBinding('messaging');
18+ global.DOMException = DOMException;
19+
20+ const whatwgStream = require(${ JSON . stringify ( whatwgStreamPath ) } );
21+ for (const [name, value] of Object.entries(whatwgStream)) {
22+ Object.defineProperty(global, name, {
23+ value,
24+ writable: true,
25+ configurable: true
26+ });
27+ }
28+ ` ) ;
29+
30+ runner . runJsTests ( ) ;
You can’t perform that action at this time.
0 commit comments