-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stream: fix web streams have no Symbol.toStringTag
stream: fix web streams have no Symbol.toStringTag stream: add unit tests PR-URL: #45117 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
- Loading branch information
1 parent
e39225d
commit 25c175e
Showing
5 changed files
with
63 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use strict'; | ||
|
||
require('../common'); | ||
|
||
const assert = require('assert'); | ||
|
||
const classesToBeTested = [ WritableStream, WritableStreamDefaultWriter, WritableStreamDefaultController, | ||
ReadableStream, ReadableStreamBYOBRequest, ReadableStreamDefaultReader, | ||
ReadableStreamBYOBReader, ReadableStreamDefaultController, ReadableByteStreamController, | ||
ByteLengthQueuingStrategy, CountQueuingStrategy, TransformStream, | ||
TransformStreamDefaultController]; | ||
|
||
|
||
classesToBeTested.forEach((cls) => { | ||
assert.strictEqual(cls.prototype[Symbol.toStringTag], cls.name); | ||
assert.deepStrictEqual(Object.getOwnPropertyDescriptor(cls.prototype, Symbol.toStringTag), | ||
{ configurable: true, enumerable: false, value: cls.name, writable: false }); | ||
}); |