Skip to content

Commit 9a9f207

Browse files
Lxxyxtargos
authored andcommitted
test: increase coverage for Blob
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/internal/blob.js.html#L132 PR-URL: #38515 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent 5eaf696 commit 9a9f207

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/parallel/test-blob.js

Lines changed: 8 additions & 0 deletions
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)