node/test/parallel/test-webstream-readable-from.js
jakecastelli 1fd170a7fc
stream: throw TypeError when criteria fulfilled in getIterator
PR-URL: https://github.com/nodejs/node/pull/53825
Fixes: https://github.com/nodejs/node/issues/53819
Refs: https://github.com/nodejs/node/issues/53819
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2024-08-01 02:00:47 +00:00

10 lines
183 B
JavaScript

'use strict';
require('../common');
const assert = require('node:assert');
assert.throws(
() => ReadableStream.from({}),
{ code: 'ERR_ARG_NOT_ITERABLE', name: 'TypeError' },
);