PR-URL: https://github.com/nodejs/node/pull/61750 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
12 lines
405 B
JavaScript
12 lines
405 B
JavaScript
// META: title=Blob methods return new objects ([NewObject])
|
|
// META: global=window,worker
|
|
'use strict';
|
|
|
|
['stream', 'text', 'arrayBuffer', 'bytes'].forEach(method => {
|
|
test(() => {
|
|
const blob = new Blob(['PASS']);
|
|
const a = blob[method]();
|
|
const b = blob[method]();
|
|
assert_not_equals(a, b, `Blob.${method}() must return a new object`);
|
|
}, `Blob.${method}() returns [NewObject]`);
|
|
});
|