Skip to content

Commit 6622650

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 14a2a00 commit 6622650

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

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

0 commit comments

Comments
 (0)