diff options
author | cjihrig <cjihrig@gmail.com> | 2021-02-13 01:27:06 +0300 |
---|---|---|
committer | Danielle Adams <adamzdanielle@gmail.com> | 2021-02-16 17:16:18 +0300 |
commit | c160d88c9e42ab86ba6ec3c0b48b9fc9e4ee7458 (patch) | |
tree | bbedc18800a9c7f9727b76bea0dac54a3c317177 /test | |
parent | dd054ca37fc2c91a3a5ba34ef73c54d60539fc6d (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.js | 11 |
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 + }); +} |