mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
test: increase coverage for Blob
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/internal/blob.js.html#L132 PR-URL: https://github.com/nodejs/node/pull/38515 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>
This commit is contained in:
1 parent
7abc7e45b2
commit
d5c734587c
1 file changed
+8
@@ -3,6 +3,7 @@
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const { Blob } = require('buffer');
|
||||
const { inspect } = require('util');
|
||||
|
||||
{
|
||||
const b = new Blob();
|
||||
@@ -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]');
|
||||
}
|
||||
Reference in new issue
Block a user