Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2021-02-13 01:27:06 +0300
committerDanielle Adams <adamzdanielle@gmail.com>2021-02-16 17:16:18 +0300
commitc160d88c9e42ab86ba6ec3c0b48b9fc9e4ee7458 (patch)
treebbedc18800a9c7f9727b76bea0dac54a3c317177 /test
parentdd054ca37fc2c91a3a5ba34ef73c54d60539fc6d (diff)
buffer: add @@toStringTag to Blob
This commit adds the toStringTag to the Blob class to match the behavior of Chrome and Firefox. PR-URL: https://github.com/nodejs/node/pull/37336 Fixes: https://github.com/nodejs/node/issues/37337 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-blob.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/parallel/test-blob.js b/test/parallel/test-blob.js
index 795d4bb6fbd..fdcc0177279 100644
--- a/test/parallel/test-blob.js
+++ b/test/parallel/test-blob.js
@@ -184,3 +184,14 @@ assert.throws(() => new Blob(['test', 1]), {
const b = new Blob(['hello'], { type: '\x01' });
assert.strictEqual(b.type, '');
}
+
+{
+ const descriptor =
+ Object.getOwnPropertyDescriptor(Blob.prototype, Symbol.toStringTag);
+ assert.deepStrictEqual(descriptor, {
+ configurable: true,
+ enumerable: false,
+ value: 'Blob',
+ writable: false
+ });
+}