Skip to content

Commit 922dace

Browse files
LxxyxMylesBorins
authored andcommitted
test: increase coverage for Blob
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/internal/blob.js.html#L132 PR-URL: #38515 Backport-PR-URL: #39704 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent 9433c28 commit 922dace

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/parallel/test-blob.js

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const common = require('../common');
44
const assert = require('assert');
55
const { Blob } = require('buffer');
6+
const { inspect } = require('util');
67
const { MessageChannel } = require('worker_threads');
78

89
{
@@ -191,3 +192,10 @@ assert.throws(() => new Blob({}), {
191192
assert.strictEqual(text, 'test42');
192193
}));
193194
}
195+
196+
{
197+
const b = new Blob();
198+
assert.strictEqual(inspect(b, { depth: null }),
199+
'Blob { size: 0, type: \'\' }');
200+
assert.strictEqual(inspect(b, { depth: -1 }), '[Blob]');
201+
}

0 commit comments

Comments
 (0)