Skip to content

Commit

Permalink
test: increase coverage for Blob
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Lxxyx authored and targos committed May 17, 2021
1 parent 14a2a00 commit 6622650
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/parallel/test-blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const common = require('../common');
const assert = require('assert');
const { Blob } = require('buffer');
const { inspect } = require('util');

{
const b = new Blob();
Expand Down Expand Up @@ -190,3 +191,10 @@ assert.throws(() => new Blob({}), {
assert.strictEqual(text, 'test42');
}));
}

{
const b = new Blob();
assert.strictEqual(inspect(b, { depth: null }),
'Blob { size: 0, type: \'\' }');
assert.strictEqual(inspect(b, { depth: -1 }), '[Blob]');
}

0 comments on commit 6622650

Please sign in to comment.